DevDuster

Why Docker Desktop's Docker.raw file grows on a Mac and how to reclaim the space safely with docker system df, prune and the disk limit setting.

Where Docker keeps everything

Docker Desktop on a Mac runs Linux in a virtual machine, and everything it stores (images, containers, volumes and build cache) lives in a single disk image:

~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw

Finder may show this file at its maximum size (often 64 GB or more) even when it uses less. To see what it really takes on disk:

du -h ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw

Do not delete Docker.raw by hand. It holds every image, container and volume, including database data in volumes.

See what is using the space

docker system df
docker system df -v

The Reclaimable column shows what pruning can free.

Prune what you no longer use

From least to most aggressive:

# Stopped containers, unused networks, dangling images, unused build cache
docker system prune

# Also every image no container uses (they download again on next pull)
docker system prune -a

# Only the build cache
docker builder prune

Volumes are kept unless you add --volumes. Look at docker volume ls before you do: a volume can be the only copy of a local database.

Cap the disk image

In Docker Desktop → Settings → Resources → Advanced, the disk usage limit sets how large Docker.raw may grow. If Finder still shows the old size after pruning, restarting Docker Desktop lets it hand the freed space back to macOS.

How DevDuster handles Docker

  • While Docker is running, it asks Docker how much stopped containers and build cache take and, if you select it, runs docker system prune -f: stopped containers, unused networks, dangling images and build cache. That is the review tier.
  • It never removes volumes or tagged images.
  • It never touches Docker.raw: ~/Library/Containers is on its hard deny list.

Do it in one pass. DevDuster is a free, open-source Mac cleaner for developers. It finds all of the above, shows exact paths and sizes, and moves only what you confirm to the Trash.

Every rule DevDuster ships, with its exact paths, is on What's safe to delete.