The short answer
- 01
Docker.raw is one disk image holding all your images, containers, volumes and build cache, at ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw.
- 02
Finder shows its maximum size, not real usage. Check real usage with ls -klsh or Settings > Resources > Advanced.
- 03
Free space from inside Docker: docker system df, then docker system prune. Docker Desktop returns the space to macOS after a few minutes.
- 04
Never delete Docker.raw by hand. It destroys every image, container and volume you have.
- 05
Clean up data or a lower disk usage limit also deletes the disk image and everything in it.
Finder shows the maximum. ls -klsh and du -h show what the file really uses.
docker builder prune- Unused build cache
- Images, containers, networks and volumes
Builds run slower once.
docker system prune- All stopped containers
- Networks not used by a container
- Dangling images
- Unused build cache
- Running containers
- Tagged images
- Volumes
It asks for confirmation. Add -f to skip the prompt.
docker system prune -a- Everything in step 02
- Every image that no container uses, not only dangling ones
- Images a running container uses
- Volumes
Removed images download or rebuild when needed.
docker system prune -a --volumes- Everything in step 03
- Anonymous volumes not used by a container
- Named volumes
- Anything a running container uses
Volumes often hold databases. Check docker volume ls and back up first.
What Docker.raw is
If Docker.raw is taking up space on your Mac, the cause is how Docker Desktop works. It runs Linux in a virtual machine, and everything Docker stores (images, containers, volumes, build cache) sits in one disk image at ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw. For what else may fill your disk, see the guide to freeing disk space on a Mac.
Why Finder shows a bigger number than reality
The file can report a very large size while using much less. Docker's documentation says the Advanced tab shows both the maximum size and the space actually used, and other tools may show the maximum. Its example is about 2.3 GB used against a 64 GB maximum.
ls -klsh ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
The first column is the space actually used. The file size column is the maximum. Removes nothing.
du -h ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
Reports allocated blocks, so it matches real usage rather than the maximum.
Safe to delete?
| Item | Verdict | What you lose |
|---|---|---|
| Build cache | Safe | Cached layers. Builds run slower once. |
| Dangling images, stopped containers | Safe | Untagged images and exited containers. Their logs and writable layers go too. |
Unused tagged images (prune -a) | Careful | Images with no container. They download or rebuild when needed. |
| Volumes | Careful | Database files and other data. Not reproducible unless you have backups. |
| Clean up data or a lower disk limit | Never without a backup | The whole disk image: every container, image and volume. |
Docker.raw deleted in Finder | Never | Same as above, with no confirmation. |
Step 1: see what Docker is using
docker system df
Shows Images, Containers, Local Volumes and Build Cache with total, active, size and reclaimable columns. Removes nothing.
docker system df -v
Adds per-image shared and unique size, so you can see which images matter.
Step 2: prune from least to most destructive
docker builder prune
Removes unused build cache only.
docker system prune
Removes all stopped containers, networks not used by a container, dangling images and unused build cache. It asks for confirmation; add -f to skip the prompt.
docker system prune -a
Also removes every image that no container uses, not only dangling ones.
docker system prune -a --volumes
Also removes anonymous volumes not used by a container. Named volumes are left alone.
Volumes often hold databases. Check docker volume ls before using the volumes flag, and back up anything you cannot recreate. A stopped container's volume is only safe to lose if you are sure nothing will need it.
Step 3: get the space back on macOS
Docker's FAQ says space is freed only when images are deleted, and it may take a few minutes to reach the host. Deleting files inside running containers does not free it. To force it:
docker run --privileged --pid=host docker/desktop-reclaim-space
Runs Docker's reclaim helper so the host sees the freed space.
Docker Desktop settings
- Settings > Resources > Advanced > Disk usage limit sets the engine maximum. Reducing it deletes the current disk image, so all containers and images are lost.
- Disk image location moves Docker.raw. Use this, never Finder.
- Troubleshoot > Clean up data resets the disk image: all local containers and images go, settings stay. Older versions call it Clean / Purge data.
OrbStack and Colima
Other runtimes use other files. OrbStack's data disk is ~/.orbstack/data/data.img. Its FAQ calls it a sparse file that takes only the space you use and shrinks when you delete data, so check it with du -h. Colima keeps VM data under ~/.colima. In both, free space inside the runtime with docker system prune, not by deleting the disk file.
Preview the prune before Docker runs it
Hoardless finds Docker.raw at the path above and reports it as a Confirm-tier item. Its size for this row is the file's reported size, so use ls -klsh above for real usage. It never moves the file to the Trash. Its action runs docker system prune -a --volumes -f, which removes unused images and anonymous volumes, so read the preview first. It also lists images no container uses, with their age, and removes them with docker image rm after you approve. It does not detect OrbStack or Colima.
See HoardlessQuestions
Why is Docker.raw so big?
It is one disk image holding every image, container, volume and build cache. It grows as Docker uses space and shrinks only when Docker frees space inside it.
Is it safe to delete Docker.raw?
Only if you accept losing all images, containers and volumes. Docker Desktop recreates an empty disk. Use Troubleshoot > Clean up data instead of deleting the file in Finder.
Does docker system prune shrink Docker.raw?
It frees space inside the image. Docker Desktop then returns space to macOS, which can take a few minutes. You can force it with docker run --privileged --pid=host docker/desktop-reclaim-space.
Does docker system prune delete volumes?
Not by default. Adding the volumes flag removes anonymous volumes only. Named volumes need docker volume rm or docker volume prune.
What is the difference between prune and prune -a?
The default removes dangling (untagged) images. The -a flag removes every image that no container uses.
How do I check Docker disk usage on a Mac?
Run docker system df, and add -v for per-image shared and unique size. Settings > Resources > Advanced shows actual versus maximum size of the disk image.
Why does Finder show a different size than du?
Finder reports the file's apparent size. du and ls -klsh report allocated blocks, which is what the file actually uses on disk.
Can I move Docker.raw to an external drive?
Yes, with Settings > Resources > Advanced > Disk image location. Never move the file in Finder, because Docker Desktop can lose track of it.
Where does Docker store images on a Mac?
Inside Docker.raw at ~/Library/Containers/com.docker.docker/Data/vms/0/data/, not as separate files. Use docker system df to see what is in it.