Docker Engine 29 reference · Volumes, Networks and Disk Usage
docker system df Command (Docker CLI)
Show disk space used by images, containers, local volumes and the build cache, and how much is reclaimable.
Docker Engine 29
Syntax
docker system df [OPTIONS]
Parameters
| Parameter | Description |
|---|---|
-v |
Per-object details. |
--format TEMPLATE |
e.g. '{{.Type}} {{.Size}}'. |
Examples
docker system df --format '{{.Type}}'
Output
Images Containers Local Volumes Build Cache
Run this on your computer — see “Get Started” for setup.
docker system df --format json | head -1 | python3 -c 'import json,sys; print("fields:", ", ".join(json.load(sys.stdin)))'
Output
fields: Active, Reclaimable, Size, TotalCount, Type
Run this on your computer — see “Get Started” for setup.
Pair it with the prune commands, scoped with filters (labels, until=24h) so you remove only what you mean to. docker volume prune deletes data.
Related
docker image rm· Remove local images or tags; an image used by a container must be forced, and shared layers stay until unused.docker volume· Create, list, inspect and remove named volumes, the Docker-managed storage that outlives containers.- Disk Usage and Cleanup · tutorial