WindowsmacOSLinux

Where Does Docker Buildx Store Cache and Builders?

Buildx keeps builder configs and build history in a buildx folder under your Docker config. Layer blobs stay in the engine data root.

Last updated

Docker splits build state in two places and people constantly look in the wrong one. Builder definitions, bake history, and node metadata live in a buildx folder inside your Docker client config. The actual layer blobs live wherever the engine data root points, which on Desktop means inside the VM disk.

When disks fill, identify which side grew. A fat buildx folder means many builders and history entries. A fat engine disk means layer cache, and that is what the prune commands target. Clearing the config folder to save space deletes your builders while leaving the blobs untouched, exactly backwards.

Where Docker stores this, by platform

Windows
%USERPROFILE%\.docker\buildx

Builder definitions and history per builder instance. Layer blobs live in the engine data root or Desktop VM disk instead. Prune builders here, prune cache at the engine.

macOS
~/.docker/buildx

Same client side layout as other platforms. Desktop stores engine blobs in the VM image, so Finder sizes of this folder understate total build disk use.

Linux
~/.docker/buildx

Client config identical to macOS. Engine blobs default under the Docker data root on native Linux, so check both locations when accounting disk.

Frequently asked questions

Build cache ate my disk. What do I clear?

Run a builder prune to drop dangling build cache. The layer cache is the usual disk hog on build machines. Filter by age on shared runners so one job cannot evict everything.

How do I see what the cache holds?

Inspect the builder and check its disk usage readout. That shows cache per builder instance, which beats guessing from the size of the config folder alone.

Notice an outdated path? Let us know.