Docker Desktop on a Mac: Docker.raw says 228 GB, docker system df says 2.5 GB, and 4.2 GB is real

By the Zofle team · 15 November 2026 · 4 min read

Docker Desktop disk image compared with docker system df

Docker Desktop on a Mac stores everything in one file called Docker.raw. Finder says it is 228 GB. docker system df says you use 2.5 GB. Your free space says somewhere in between. All three are correct, and we measured how they fit together on a Mac that is running containers right now.

Three numbers for the same thing

bash
ls -lh ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
du -sk  ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
docker system df
What reported itNumberWhat it means
ls -l on Docker.raw245,106,737,152 bytes (228 GiB)the file's limit, not what it uses (it is a sparse file)
du -sk on Docker.raw4,443,612 KB (4.24 GiB)blocks actually allocated on your SSD
docker system df (images + containers + volumes + build cache)1.262 GB + 1.05 MB + 0 + 1.276 GB = about 2.54 GBwhat Docker itself tracks

The gap: Docker.raw holds about 1.9 GiB more than Docker's own report. That is the Linux virtual machine's system files, filesystem overhead, and space that was used and freed inside the VM. We did not break it down further, so we only claim the size of the gap. And the only number that matters for your free space is the middle one: 4.24 GiB, not 228 GiB.

What docker system df showed

TypeTotalActiveSizeReclaimable
Images311.262 GB774.6 MB (61%)
Containers111.053 MB0 B
Local volumes000 B0 B
Build cache2801.276 GB13.88 MB

docker system df -v lists each item. The three images were 504 MB, 550 MB and 348 MB; the two 24.04 test images shared 139.4 MB of layers, so removing one frees less than its listed size. Only one of the three has a running container, which is why 774.6 MB (the two unused ones) shows as reclaimable. The build cache is 1.276 GB but only 13.88 MB is reclaimable, because the other entries are still referenced by images we have: the cache looks big but is mostly shared.

Which prune removes what

We did not run any of these here, because the images belong to other work on this Mac. This table is from Docker's documentation, with the reclaimable figures above to show what each would touch on this Mac:

CommandRemoves (per Docker docs)On this Mac
docker builder pruneunused build cacheabout 13.88 MB
docker image prunedangling (untagged) imagesdepends on tags; none obviously dangling
docker image prune -aevery image no container usesup to 774.6 MB
docker system prunestopped containers, unused networks, dangling images and build cachesmall
docker system prune -a --volumesalso unused images and unused volumesup to ~790 MB; volumes can hold database data

Run docker system df first, then the smallest prune that covers what you want, and read the confirmation list. --volumes is the dangerous flag: a stopped database's data lives in a volume, and 'unused' just means no running container uses it right now.

Getting the disk back, and what not to do

  • Deleting images does not shrink the file's limit, but it does free blocks inside it. Docker Desktop's file is sparse, so check du -sk on it, not Finder's size.
  • The limit is set in Docker Desktop > Settings > Resources > Advanced (Disk image size). Lower it only when your real usage is far below.
  • Troubleshoot > Clean / Purge data deletes all images, containers and volumes. Never use it as a way to save a few GB.
  • Do not copy, move or delete Docker.raw yourself while Docker is running. Quit Docker Desktop first.

For the Windows side of the same problem, see Docker and WSL: vmmem and ext4.vhdx. For Go builds inside containers, the Go cache article shows what to cache.

Zofle shows your Mac storage by category and lets you move big, old files to the Trash with Undo, so you can see what is worth the effort before you run any command.

Download Zofle for Mac

Sources and method

Zofle Pro news

People signing up now will get Zofle Pro, with more features, for free when we launch it.

One email when it's ready. No spam, ever.