Command reference
ed machines docker df
Reports docker's disk usage by object type, and how much of it is reclaimable.
ed machines docker df [--json] <machine>Arguments
| Name | Type / values | Default | What it does |
|---|---|---|---|
<machine> |
machine name, ssh alias, id, or any unambiguous prefix | required | Which machine to ask. |
Options
| Name | Type / values | Default | What it does |
|---|---|---|---|
--json |
flag | off | Emit JSON on stdout instead of the table. |
--help, -h |
flag | off | Print the help for this command on stdout and exit 0. |
$ ed machines devbox docker dfTYPE TOTAL ACTIVE SIZE RECLAIMABLEImages 12 5 11.3 GB 3.6 GBContainers 5 0 462 MB 462 MBLocal Volumes 10 4 11.7 GB 273 MBBuild Cache 0 0 0 B 0 B[ { "active": 5, "reclaimableBytes": 3585000000, "sizeBytes": 11310000000, "total": 12, "type": "Images" }, { "active": 4, "reclaimableBytes": 272700000, "sizeBytes": 11730000000, "total": 10, "type": "Local Volumes" }]typeis docker's own label:Images,Containers,Local VolumesandBuild Cache, capitalised and spaced exactly like that.totalis docker'sTotalCountandactiveis how many of them are in use.sizeBytesandreclaimableBytesare parsed from docker's decimal strings. Docker prints reclaimable as3.585GB (31%); the percentage is dropped and only the size is kept.
This is the report to read before pruning. reclaimableBytes for Images is
what prune images would free, and the Local Volumes row is what
prune volumes would free, which is data rather than cache.
Examples
ed machines devbox docker dfed machines devbox docker df --json | jq -r '.[] | "\(.type) \(.reclaimableBytes)"'ed machines devbox docker df --json | jq 'map(.reclaimableBytes) | add'Behaviour notes
Read only, 45 second ceiling, docker system df --format '{{json .}}'. On a
busy daemon this is the slowest of the read commands, because docker walks the
image and volume trees to answer it.
Where to go next
ed machines docker, the rest of this group- All
edcommands