1 min read

Docker cleanup commands you'll actually use


When Docker eats your disk

Check how much space Docker is using:

docker_disk.sh
docker system df

Remove stopped containers, unused networks, dangling images, and build cache:

docker_prune.sh
docker system prune -f

Also remove unused images (not just dangling):

docker_prune_all.sh
docker system prune -a -f

Remove unused volumes (careful — this deletes data):

docker_volumes.sh
docker volume prune -f

Remove images older than 24 hours:

docker_old_images.sh
docker image prune -a --filter "until=24h" -f