Docker Disk Doctor is a safe, explain-first CLI tool that shows how Docker is using disk space and what is safe to clean — without blindly running docker system prune.
Built from real homelab and infrastructure pain.
Docker is great… until your disk suddenly fills up.
At that point, most people run:
docker system prune -a…and hope for the best.
Docker Disk Doctor exists to answer one simple question before you delete anything:
What exactly is using my disk space, and what is safe to remove?
This tool is safe-by-default.
It explains first — you decide what to clean.
- Full breakdown of Docker disk usage:
- Images (used vs unused)
- Containers (running vs stopped)
- Volumes (attached vs orphaned)
- Actual disk usage (MB / GB)
- Clear, readable CLI tables
- Safe-by-default cleanup (nothing is deleted unless you explicitly confirm)
- Designed for homelabs, servers, and real systems
You need pipx.
On most Debian / Ubuntu systems:
sudo apt update
sudo apt install -y pipx
pipx ensurepathYou may need to open a new shell after running
pipx ensurepath.
pipx install docker-disk-doctorThis installs the dockerdoctor command globally for your user.
pipx install git+https://github.com/andreasrevdal/docker-disk-doctor.gitdockerdoctorThis will display:
- Used vs unused images
- Running vs stopped containers
- Attached vs orphaned volumes
No changes are made to your system.
Docker Disk Doctor is safe-by-default.
Nothing is deleted unless you explicitly confirm it.
dockerdoctor test clean allYou can also preview specific targets:
dockerdoctor test clean images
dockerdoctor test clean volumesdockerdoctor clean all --yesOr target specific resources:
dockerdoctor clean images --yes
dockerdoctor clean volumes --yesThe
--yesflag is required to prevent accidental data loss.
- No automatic deletions
- No force-removal by default
- No surprises
- Docker may refuse to delete resources still in use — those are skipped safely
If this tool saved you time, stress, or disk space,
consider buying me a coffee ☕
https://buymeacoffee.com/revdal
MIT License
