Analyze, prune, and reclaim disk space from Docker resources with a single command.
bash
python3 skills/docker-cleanup/scripts/docker_cleanup.py
Output:
text
🐳 Docker Engine v26.1.3
Type Count Size Reclaimable
---------------------------------------------------------------
images 12 2.4GB 856MB
containers 8 1.1GB 0B
volumes 4 520MB 320MB
build cache 15 1.8GB 1.5GB
CONTAINER ID NAME IMAGE STATUS CREATED
---------------------------------------------------------------------------------------------------
abc123... my-app node:20 Up 3 days 2d ago
def456... old-db postgres:15 Exited (0) 5 days 1w ago
⚠ Dangling images: 3
sha256:x1y2 → 450MB
sha256:p3q4 → 120MB
CommandDescriptionpython3 docker_cleanup.pyDefault: analyze only (dry-run, no changes)python3 docker_cleanup.py --containersPrune stopped containerspython3 docker_cleanup.py --imagesPrune dangling imagespython3 docker_cleanup.py --volumesPrune unused volumespython3 docker_cleanup.py --networksPrune unused networkspython3 docker_cleanup.py --allFull system prune (all of the above)python3 docker_cleanup.py --all --forceAuto-confirm all pruningpython3 docker_cleanup.py --jsonJSON output for programmatic usepython3 docker_cleanup.py --reportGenerate HTML reportpython3 docker_cleanup.py --analyzeExplicit analysis mode
bash
python3 skills/docker-cleanup/scripts/docker_cleanup.py
bash
python3 skills/docker-cleanup/scripts/docker_cleanup.py --images --force
bash
python3 skills/docker-cleanup/scripts/docker_cleanup.py --all --force
bash
python3 skills/docker-cleanup/scripts/docker_cleanup.py --report
# Creates: docker-cleanup-report-20260515-090500.html
bash
python3 skills/docker-cleanup/scripts/docker_cleanup.py --json