Guides Docker
How to free up space from Docker on a Mac
Docker Desktop keeps every image, container and volume in one big file. Here's how to see what's inside it, shrink it safely, and why its size looks bigger than it is.
Updated 20 November 2026
Where the space goes
Docker on a Mac runs inside a small virtual machine. Everything it stores (images, containers, volumes and build cache) lives in one file:
~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
Don’t delete this file to free space. It holds every container and volume you have, and their data goes with it.
Its size looks bigger than it is
The Finder and ls -lh show the most the file can grow to, often 64 GB or more. The space it really uses on your disk is usually much less. To see the real figure, run:
du -h ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
See what’s inside
Docker can tell you what the space is used for. With Docker running:
docker system df
It shows images, containers, volumes and build cache, and how much of each could be removed.
Remove what’s unused
Start with the safest command and go further only if you need to:
| Command | What it removes |
|---|---|
docker builder prune |
Build cache |
docker system prune |
Stopped containers, unused networks, untagged images and build cache |
docker system prune -a |
All of the above, plus every image no container uses |
docker volume prune |
Volumes no container uses |
Each one asks before it removes anything.
Be careful with volumes. They hold data such as local databases, and a removed volume can’t be brought back. Check the list with
docker volume lsfirst.
Images removed by prune -a download again the next time you need them, which can take a while on a slow connection.
Once space is freed inside Docker, Docker Desktop gives it back to your Mac. This can take a few minutes, so check again with du a little later.
Limit how big it can grow
In Docker Desktop, open Settings › Resources to see the disk image’s size limit. Docker warns you before a change that would remove your images and containers.
Not using Docker any more?
Uninstalling Docker Desktop can leave its data behind in ~/Library/Containers/com.docker.docker, which is often many gigabytes. See how to uninstall apps completely.