Docker “no space left on device”: reclaim disk deliberately
Find what is consuming Docker's disk with docker system df, then prune images, build cache, or volumes deliberately.
Run docker system df to see what is full, then reclaim it: docker builder prune for build cache, docker system prune for stopped containers and dangling images. On Docker Desktop, enlarge the disk image under Settings > Resources if it is capped.
Try these fixes in order
Find what is consuming space
Measure Docker's disk usage by resource type. The RECLAIMABLE column shows what pruning can free.
docker system dfPrune the build cache first
Clear the build cache, usually the biggest and safest win. It only affects future build speed, not running containers.
docker builder prunePrune unused containers and images
Remove stopped containers, unused networks, and dangling images. Review the warning list before confirming.
docker system pruneHandle volumes carefully
If volumes hold the space, prune only unused ones with docker volume prune, and only add --volumes to system prune when you are certain no needed data lives in anonymous volumes.
docker volume pruneEnlarge the Desktop disk image if capped
On Docker Desktop, if the disk image itself is at its limit, increase it under Settings > Resources, then apply and restart.
Interpret what you see
The error appears during pull, build, or container start
What it suggests: Docker's own storage is full. docker system df shows a breakdown by images, containers, volumes, and build cache with a reclaimable column.
Next check: Run docker system df and note which row holds the most reclaimable space.
docker system df shows gigabytes under Build Cache
What it suggests: Build cache is frequently the largest consumer after repeated builds; it is safe to clear because it only speeds up future builds.
Next check: Check the Build Cache row of docker system df.
Host has free space but Docker still reports full
What it suggests: On Docker Desktop the daemon runs inside a VM with its own disk image; host disk space does not help once that image is full.
Next check: Check Docker Desktop Settings > Resources for disk image usage.
Why this happens
- Unused images, stopped containers, and build cache have accumulated and filled Docker's storage.
- On Docker Desktop, the fixed-size VM disk image is full even though the host has free space.
Still not working?
Do not run docker system prune -a --volumes as a reflex on a machine with databases; it deletes anonymous volumes holding real data. Start with docker system df to see what is actually consuming space, and prune the specific resource type first.
Official sources
These steps are based on the linked documentation and general diagnostics. BugMedic has not independently tested every product and system configuration. Review commands before running them.