Limpa Tudo

Guides

Docker taking too much space on Mac: why Docker.raw doesn't shrink and how to reclaim it

Published November 23, 2026

On a Mac, Docker runs inside a Linux virtual machine. Images, containers, volumes and build cache all live in a single virtual disk file, Docker.raw, under ~/Library/Containers/com.docker.docker/Data/vms/0/data/. That's why Docker's space looks like one big block — and why looking for images in Finder doesn't help.

1. Why Docker.raw looks huge

Docker.raw is a sparse file: its logical size is the virtual disk limit (say, 64 GB), but on disk it only takes what the VM actually used. ls shows the limit; du shows the real usage:

cd ~/Library/Containers/com.docker.docker/Data/vms/0/data
ls -lh Docker.raw   # logical size (the limit)
du -h Docker.raw    # what it actually takes

When you delete images inside Docker, the space is freed inside the VM and handed back to macOS gradually; it can take a few minutes for du to go down.

2. See what's using it

docker system df       # summary: images, containers, volumes, build cache
docker system df -v    # item by item

3. Clean from the inside, safest first

# stopped containers
docker container prune

# build cache (BuildKit) — often the biggest slice if you build a lot
docker builder prune

# untagged ("dangling") images
docker image prune

# every image no container uses (pulled again when needed)
docker image prune -a

Or all at once: docker system prune -a (stopped containers, unused networks, unused images and build cache).

Volumes are data. Local databases (Postgres, MySQL, Mongo) usually live in volumes. docker volume prune removes volumes no container uses — in recent versions only anonymous ones; with --all, named ones too. List them first with docker volume ls and only delete what you know you don't need.

4. Cap the virtual disk

Docker Desktop › Settings › Resources › Advanced has the virtual disk limit. A lower limit keeps Docker from growing unchecked. Mind Docker's own warning: lowering the limit may recreate the disk and delete images, containers and volumes.

5. Never do this by hand 🔴

Deleting ~/Library/Containers/com.docker.docker/Data/vms (or Docker.raw) wipes everything in Docker at once: images, containers and volumes with your data. If that's really the goal, use Troubleshoot › Clean / Purge data in Docker Desktop instead of Finder.

6. A leftover you can delete 🟢

~/Library/Application Support/com.docker.install holds Docker Desktop's update installer (sometimes a partial download). It isn't your data and can go.

Summary

WhatHowRisk
Stopped containers, build cache, unused imagesdocker system prune -a🟢 low (images are pulled again)
Volumesdocker volume prune, after listing🟡 medium (may hold data)
Old installerdelete com.docker.install🟢 low
vms folder / Docker.rawonly via Clean / Purge data🔴 high (wipes everything)

In Limpa Tudo, Docker's VM data only shows up in advanced mode, and the app requires Docker Desktop to be closed.