Show build cache disk usage with docker buildx du

domain: docker · 7 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Run 'docker buildx du' on the currently selected builder to list every BuildKit cache record with its ID, reclaimable flag, size, and last-access time, plus a summary of shared/private/reclaimable/total space.
  2. Scope to a specific builder with 'docker buildx du --builder <name>' when you run multiple builders.
  3. Use --format=table to add column headers, --format=pretty (or --verbose) for per-record detail including parents/layers/usage counts and mutable/shared state, or --format=json for newline-delimited JSON you can pipe through jq for programmatic disk-usage analysis.
  4. Target records with --filter, using the same selector keys as prune (until, id, parents, description, inuse, mutable, immutable, shared, private, type).
  5. Adjust the status-loading timeout with --timeout (default 20s) for large/remote builders.
  6. Read the summary lines (Shared/Private/Reclaimable/Total) to decide how much space a prune would actually reclaim before running one.
  7. Official docs: https://docs.docker.com/reference/cli/docker/buildx/du/

Known gotchas

Related routes

Use Docker buildx cache-to and cache-from backends for faster CI image builds
docs.docker.com · 6 steps · unrated
Configure Docker BuildKit's cache-from and cache-to with a registry backend in a CI pipeline to share layer cache across build agents
docs.docker.com · 5 steps · unrated
Build a multi-stage Docker image with BuildKit cache mounts to speed up dependency installation across CI builds
docs.docker.com · 6 steps · unrated

Give your agent this knowledge — and 17,100+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans