Apps

Docker Build Cache

Docker’s build system stores local BuildKit cache records such as intermediate image layers, snapshot diffs, content-addressed blobs, and cached build results so repeated docker build steps can be reused instead of rebuilt from scratch. Over time, dangling cache entries accumulate after Dockerfile changes, base image updates, canceled builds, and branch churn, consuming large amounts of disk without affecting your actual containers or named images. Kudu prunes the active local Docker engine’s unused build cache, removing stale BuildKit cache data while leaving containers, volumes, images, builders, accounts, and settings untouched.

Why clean Docker Build Cache?

  • Dangling BuildKit layers from old Dockerfile states pile up after frequent rebuilds, and the first symptom is Docker Desktop or the host disk suddenly losing tens of gigabytes
  • Cache records tied to outdated base images can keep reusing stale build results, so you may see confusing builds that appear to ignore dependency or package updates until the cache is pruned
  • Canceled or failed builds often leave partial snapshot diffs and content blobs behind, which shows up as disk usage growing even though no new runnable images appear in docker images
  • Heavy branch switching in monorepos creates many near-duplicate cached steps, leading to slower cache resolution and noticeably longer build planning before any build output starts
  • Build cache growth can push laptops and CI workstations into low-disk conditions, causing observable errors like no space left on device during unrelated image pulls or container starts
  • Builder metadata can become cluttered with old, unused results that are no longer reachable from current builds, so pruning frees space while preserving your containers, volumes, and login state
What gets cleaned

Cache paths Kudu targets

Windows

~

macOS

~

Linux

~
Frequently asked

Common questions about Docker Build Cache

Free & open source

Download Kudu and reclaim your disk space.

Available on Windows, macOS, and Linux. No account required, no feature gates, no telemetry without consent. All cleaning targets are open source and community-auditable.