Docker taking up too much space on Mac? How to shrink Docker.raw
In short
Docker Desktop keeps everything (images, containers, volumes, build cache) in one virtual disk, Docker.raw. Run docker system df to see what's inside, docker system prune to clean what's unused, and be careful with volumes: that's where your databases live.
Where the space goes
Docker Desktop runs Linux in a small virtual machine, and that machine's disk is a single file:
~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.rawFinder may show its maximum size, not what it really uses (it's a sparse file). To see the real figure:
du -h ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.rawSee what's inside
docker system dfIt lists images, containers, local volumes and build cache, with how much of each is reclaimable. Add -v for the detail of each item.
Clean what's unused
docker system prune: stopped containers, unused networks, dangling images and build cache. Safe for most people.docker system prune -a: also every image not used by a container. They'll download again when you need them.docker builder prune: only the build cache, often the biggest part if you build images.docker volume prune: unused volumes. Careful: volumes hold databases and other data that doesn't come back.
Make the file smaller
Recent Docker Desktop versions give freed space back to macOS by themselves, but it can take a few minutes. You can also lower the maximum in Settings → Resources → Advanced → Virtual disk limit. As a last resort, Troubleshoot → Clean / Purge data deletes everything (images, containers and volumes) and starts from zero.
Lighter alternatives
If you only need containers for development, OrbStack and Colima use disks that grow and shrink more easily. They still need the same prune commands from time to time.
DiskSpace AI does this for you
It analyzes your Mac in minutes, tells you what each folder is and only selects what recreates itself. Your files are kept 7 days in case you change your mind. Free during the beta.
Download the BetaFolders in this guide
More guides
- Not enough space to update macOS? How to make room safely
- What is “System Data” on a Mac, and why is it so big?
- How to free up space on your Mac without deleting anything important
- How to find and delete duplicate photos on Mac
- Xcode taking up space? What you can delete (and what you can't)
- How to clear npm, pnpm, pip, uv and Homebrew caches on Mac
- How to find large files on Mac (including hidden ones)
- What is purgeable space on Mac, and how to free it
- DaisyDisk alternative: DiskSpace AI vs DaisyDisk
- CleanMyMac alternative without a subscription
- The best disk space analyzers for Mac in 2026