Why Docker.raw takes up so much space on your Mac
What Docker Desktop’s Docker.raw file is, why it can look far bigger than it is, and how to get space back without losing your containers.
If you use Docker Desktop, one of the biggest files on your Mac may be Docker.raw. This guide explains what it is, why its size can look alarming, and how to make it smaller, using Docker’s own documentation.
What is Docker.raw?
Docker Desktop keeps its Linux containers and images in a single, large disk image file on your Mac. In Docker’s documentation, that file is Docker.raw.
So Docker.raw isn’t a cache or a log. It holds the images and containers you have in Docker Desktop.
Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab).
Where is Docker.raw on a Mac?
Docker Desktop shows where its disk image is:
- Open Docker Desktop.
- Select Settings, then Resources, then Advanced.
The Advanced tab shows the disk image’s location, its maximum size, and how much space it really uses. In Docker’s own example, the file is in:
~/Library/Containers/com.docker.docker/Data/vms/0/data
Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab).
Why does Docker.raw look so big?
Docker.raw has a maximum size and an actual size, and the two can be very different. Docker notes that many tools report the maximum size, not the space the file really takes.
To see the actual size, run this in Terminal:
cd ~/Library/Containers/com.docker.docker/Data/vms/0/data
ls -klsh Docker.raw
In Docker’s example, the maximum size is 64 GB, but the file really uses 2,333,548 KB.
The actual size grows as you pull images and create containers. Deleting files inside a running container doesn’t make it smaller. Space is only freed when images are deleted.
Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab).
How to make Docker.raw smaller
Start by seeing what’s using the space:
docker system df -v
docker image ls and docker container ls -a list your images and containers one by one. Then remove what you no longer need:
docker system prune
This removes stopped containers, networks no container uses, dangling images and unused build cache. It asks you to confirm first.
Docker says the space can take a few minutes to come back to your Mac. To reclaim it straight away:
docker run --privileged --pid=host docker/desktop-reclaim-space
Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab) and Prune unused Docker objects (opens in a new tab).
Can I delete Docker.raw?
Docker’s documentation doesn’t give steps for deleting Docker.raw by hand. It does say what happens when Docker Desktop replaces it: when you lower the disk image’s maximum size, the current file is deleted, and all containers and images are lost.
If you want the space back and still need your images, prune them as above instead.
Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab).
Move it to another drive, or lower its limit
Both settings are in Docker Desktop, under Settings › Resources › Advanced.
- Move it. In Disk image location, select Browse, choose a new location, then select Apply.
- Lower its maximum size. Drag the Disk image size slider to a lower limit, then select Apply. This deletes the current disk image, with every container and image in it.
Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab).
Sources
- Docker Docs: FAQs for Docker Desktop for Mac (opens in a new tab)
- Docker Docs: Prune unused Docker objects (opens in a new tab)
Every source was checked on 2 November 2026, against macOS 27.
Disk Census lists Docker Desktop’s disk image with your other developer files, and marks it as one to keep, because deleting it removes every image, container and volume.
See how Disk Census worksMore how-tos
- How to clear developer caches on your MacXcode, Homebrew, npm and Docker each have their own way to give space back, set out in their own documentation.
- What is DerivedData in Xcode, and how do you clean it?What Xcode keeps in DerivedData, why it can fill up your Mac, and how to clean it safely, from Apple’s own Xcode Help.
- How to see what’s using your Mac’s storageStorage settings show how full your disk is, which kinds of files take the most space, and the large files you can remove.
- How to free up space on your MacStart with the recommendations built into macOS, then remove the files, apps and backups you no longer need.