What is Docker.raw on Mac, and can you delete it?
Do not delete Docker.raw by hand. It is the virtual disk that holds every Docker image, container and volume on your Mac, so removing it wipes all of them. Free space by pruning inside Docker instead.
Where it is
~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.rawWhat it is
Docker Desktop runs containers inside a small Linux virtual machine, and Docker.raw is that machine's disk. Everything Docker stores lives inside this one file: pulled images, build cache, stopped containers and named volumes, including any databases you keep in volumes.
The file is sparse. Finder may show it at its maximum allowed size, while the space it really takes on your disk is smaller. Running du -h on the file, or looking in Docker Desktop's settings, shows the real figure.
It grows as you pull images and build. Old images, dangling layers and build cache stay until you remove them.
How big it gets
Often tens of GB on a Mac that uses Docker regularly, up to the disk limit set in Docker Desktop.
How to shrink it the right way
- Start Docker Desktop, then run docker system df in Terminal to see what is using space: images, containers, volumes or build cache.
- Run the command below. It removes stopped containers, unused networks, dangling images and unused build cache.
- For a deeper clean, docker system prune -a also removes every image not used by a container. Adding --volumes removes unused volumes too, which can delete data, so check your volumes first.
- To cap how large the file may grow, lower the disk usage limit under Settings > Resources in Docker Desktop. Docker warns you if a change will erase existing data.
docker system pruneWhat happens afterwards
Pruned images are pulled or built again the next time you need them, so the first run is slower. Containers and volumes that are in use are kept.
How Diskzy handles it
Diskzy shows how large Docker.raw really is on the disk map, so you know when it is time to prune inside Docker. It does not shrink the file for you.
Related guides
- Ollama models~/.ollama/models
- Application Support~/Library/Application Support
- node_modules<project>/node_modules
See where your Mac's space went
Diskzy maps your disk, explains System Data and clears what's safe. Free for 72 hours, then $9 once for 2 Macs.
Try Diskzy for free