Docker · Arazzo Workflow
Docker Reclaim Disk Space on a Host
Version 1.0.0
Measure disk usage, prune stopped containers, dangling images, unused volumes and networks, and the build cache, then measure again.
Provider
Workflows
reclaim-disk-space
Measure, prune in dependency order, and re-measure host disk usage.
Takes a before reading of image, container, volume, and build-cache usage, prunes stopped containers, then dangling images, then unused volumes and networks, then the build cache, and takes an after reading to quantify what was reclaimed.
1
measureBefore
Take a before reading across all four object types so the reclaim can be quantified rather than guessed at.
2
pruneContainers
Prune stopped containers older than the age filter first. This must precede the image prune, because an image still referenced by a stopped container cannot be removed.
3
pruneImages
Prune only dangling — unused and untagged — images. Setting dangling to false would remove every unused image, including tagged ones a pipeline expects to still be cached.
4
pruneVolumes
Prune unused volumes, scoped by the supplied label filter. This is the destructive step in the flow — a volume prune without a filter will take any unused named volume with it, data and all.
5
pruneNetworks
Prune user-defined networks with no attached containers, older than the age filter. Pre-defined networks are never touched by this call.
6
pruneBuildCache
Trim the BuildKit cache down to a reserved size rather than clearing it outright, so subsequent builds keep most of their cache hits.
7
measureAfter
Take the after reading across the same four object types so the caller can diff it against the before reading and report what was actually reclaimed.
Source API Descriptions
openapi
openapi
openapi
openapi
Arazzo Workflow Specification
Work with this as data
Every workflow here is available over the APIs.io API and to AI agents over MCP.