Docker using 50GB disk space. Old images, stopped containers, unused volumes everywhere.
# Remove everything unused (safe) docker system prune -a # Also remove volumes (careful!) docker system prune -a --volumes # See what will be removed first docker system df
What Gets Removed:
– Stopped containers
– Unused images
– Dangling build cache
– Unused volumes (with –volumes flag)
Recovery: Typically reclaims 10-30GB instantly.
Automate: Add to cron: 0 2 * * 0 docker system prune -af (weekly cleanup)
