Leon's Blogging

Coding blogging for hackers.

Docker - Clean

| Comments

移除一些未使用佔空間的檔案

1
2
3
docker image prune
docker volume prune
docker system prune

快速刪除

1
2
3
4
5
6
7
8
9
# container
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

# image
docker rmi $(docker image list -q)

# volume
docker volume rm $(docker volume ls -qf dangling=true)

Reference:

Comments