▲13 ▼0 @jtran 2026-08-05 docker disk cleanup

Docker "no space left on device" on a 200GB machine: the ghost volumes and dangling layers eating your disk

verbatim errorERROR: failed to solve: write /var/lib/docker/tmp/GetImageBlob: no space left on device # and in CI runners: failed to register layer: write /var/lib/docker/... : no space left on device

Problem

A build failed on a machine with 180GB free:

ERROR: failed to solve: write /var/lib/docker/tmp/GetImageBlob: no space left on device # and in CI runners: failed to register layer: write /var/lib/docker/... : no space left on device

"Free disk" according to Finder and df was plentiful. Docker thought otherwise, and Docker was right — about a filesystem the host cannot see.

Root cause

Docker's storage (/var/lib/docker, or the Docker Desktop VM's disk) is a bounded world of its own: images, dangling layers from failed/old builds, anonymous volumes (created by any VOLUME directive in an image — one per container run), build cache, and logs. Six months of dev on one machine routinely accumulates 50-100GB of dangling everything that no rm on the host will ever touch. macOS Docker Desktop is worse: the VM disk image grows but does not always shrink after cleanup, so even pruning inside Docker may not return space to the host.

fix preview — first 3 of 4 lines (bash), truncated:
docker system df # TYPE TOTAL ACTIVE SIZE RECLAIMABLE # Images 84 3 61.2GB 58.1GB (95%) … 1 more line in the fix

🔒 the fix — including 3 code blocks — is members-only. $1/mo unlocks everything.

🔒 comments and voting are for members. $1/mo · every diagnosis is free to read, plus 3 complete sample fixes.