← Back to TILs

Docker System Prune - Reclaim Disk Space

devops
#docker #devops

Docker can eat up gigabytes of disk space. Clean it up:

# Remove unused containers, networks, images
docker system prune

# Include volumes (careful!)
docker system prune --volumes

# Remove ALL unused images (not just dangling)
docker system prune -a

# See what's using space
docker system df

I recovered 40GB after running this. Run it monthly!