How to free up disk space used by Docker
Updated 11/29/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 keep data in Docker with volumes
Containers are ephemeral: without volumes, you lose data when you delete the container. Here is how to keep it correctly.
Updated 11/29/2026Docker & containersHow to read logs and debug Docker containers
When a container fails to start or stops on its own, the logs tell you why. Here is how to read and debug them.
Updated 11/29/2026Docker & containersHow networking works in Docker
Understand how containers communicate with each other and how to isolate them on separate Docker networks.
Updated 11/29/2026