[+] 增加清理磁盘脚本
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 52s
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 52s
This commit is contained in:
17
clean.sh
Normal file
17
clean.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
# 清理 apt
|
||||
sudo apt-get autoremove -y
|
||||
sudo apt-get autoclean -y
|
||||
sudo apt-get clean -y
|
||||
# 清理 docker
|
||||
docker system prune -a -f --volumes
|
||||
# 清理日志
|
||||
sudo journalctl --vacuum-size=10M
|
||||
# 列出清理后容器大小
|
||||
docker ps -a --format "{{.ID}}\t{{.Image}}\t{{.Size}}"
|
||||
docker images --format "{{.Repository}}:{{.Tag}}\t{{.Size}}"
|
||||
# 列出磁盘空间
|
||||
df -h
|
||||
|
||||
# 查看占用磁盘
|
||||
# sudo du -ah / | sort -rh | head -20
|
||||
|
||||
Reference in New Issue
Block a user