Quick answer
Prune with docker system df && docker system prune -a, quit Docker Desktop, then use Troubleshoot → clean/compact options. Typical recovery after heavy use: 10–40 GB on Docker.raw.
Where the space goes
Why Docker.raw keeps growing
On Apple Silicon and Intel Macs, Docker runs in a lightweight VM. All images, containers, and volumes live inside Docker.raw. Deletes inside Docker do not always shrink the host file until compaction runs.
Step 1: Prune unused artifacts
docker system df
docker system prune -a
docker builder prune -aConfirm no stopped stacks need orphaned images before -a.
Step 2: Compact the disk image
- Quit Docker Desktop completely.
- Open Docker Desktop → Settings → Resources or Troubleshoot.
- Use Clean / Purge or vendor compact controls after pruning.
- As a last resort, export needed volumes and use Reset to factory defaults (destructive).
FAQ
Why does Docker.raw stay large after docker prune?
Pruning frees space inside the Linux VM but the sparse APFS image (Docker.raw) often does not shrink until you compact it or reset Docker Desktop data.
Is compacting Docker.raw safe?
Yes if your images and volumes are already pruned. Quit heavy builds first; compaction only reclaims unused blocks inside the disk image.
How much space can I recover?
After a full prune, many dev Macs recover 10–40 GB from Docker.raw alone, depending on image churn.
Run this cleanup in SpaceWise
Same targets, Recovery Bin rollback, no Terminal required. Free tier included.