How to free up disk space used by Docker
Updated 7/20/2026
Over time, Docker accumulates old images, stopped containers and unused volumes that take up disk space. Here is how to clean up.
1. See how much Docker uses
docker system df
2. Quick, safe cleanup
Remove stopped containers, unused networks and dangling images:
docker system prune
3. More aggressive cleanup
Also includes unused images (not just dangling ones):
docker system prune -a
4. Be careful with volumes
Volumes hold your data. Only delete them if you are sure:
docker volume prune
Check first which volumes are orphaned with docker volume ls, so you do not lose application data.
5. Automate
Add a weekly cleanup to cron:
0 4 * * 0 docker system prune -af
When the disk is too small
If you still run out of space, you need a bigger disk. With hourly billing you can move to a plan with more storage quickly, or move data to a Backup Box.
Put this guide into practice on your own VPS
EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.
See pricingRelated tutorials
How to run your own private Docker registry
Host your own Docker images on a private server, without depending on external services.
Updated 7/20/2026Docker & containersHow to deploy a full app with Docker Compose
Put together a web app with a database and an HTTPS proxy, all defined in Docker Compose.
Updated 7/20/2026Docker & containersDocker security best practices
Run safer containers: non-root users, official images, limited resources and protected secrets.
Updated 7/20/2026