Docker taking up space on your Mac?
Updated 13 October 2026
Docker Desktop stores every Linux image, container, volume and build cache inside a single disk image file, Docker.raw, so its size grows as you pull and build. Run docker system df to see what is using that space, then remove unused containers, images and build cache with the prune commands below, leaving volumes until last because they hold data.
One note up front: WTMemory, the Mac app this site is about, deliberately does not clean Docker data. Docker's own commands are the right tool, and this guide covers them. WTMemory can only show Docker's memory and CPU and the size of folders on disk.
Where does Docker store data on a Mac?
By default the disk image lives at:
~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
If you moved it, Docker Desktop shows the current location under Settings > Resources > Advanced > Disk image location. Everything inside the Linux VM, including images, containers, named volumes and build cache, is stored in this one file. You cannot browse it in Finder like a normal folder.
How big is Docker.raw really?
Docker.raw is a sparse file. Finder and some tools report its maximum size, not the space it actually takes on disk. Docker's own Mac FAQ suggests checking it like this:
cd ~/Library/Containers/com.docker.docker/Data/vms/0/data
ls -klsh Docker.raw
The first number is the real disk usage; the size column later in the line is the maximum the file can grow to. If Finder says 64 GB but ls -klsh reports a few GB, you are not short of that much space.
How do I see what Docker is using space on?
With Docker running, use:
docker system df
docker system df -v
The first prints totals for Images, Containers, Local Volumes and Build Cache, with a RECLAIMABLE column. The -v version lists every image, container and volume with its size, so you can see which volume is the 20 GB database or which image you pulled once and forgot.
What does each prune command delete?
These descriptions follow Docker's pruning documentation, checked 13 October 2026. Each command asks for confirmation unless you pass -f.
| Command | What it removes | Risk |
|---|---|---|
docker container prune | All stopped containers. | Low. Anything written inside a stopped container's filesystem, not in a volume, is lost. |
docker image prune | Dangling images only (untagged and unused). | Low. |
docker image prune -a | Every image not used by an existing container. | Medium. You will download or rebuild them next time. |
docker buildx prune or docker builder prune | Dangling build cache. Add --all for all build cache. | Low. Next builds are slower. |
docker system prune | Stopped containers, unused networks, dangling images and unused build cache. Volumes are not touched. | Low to medium. |
docker system prune -a | The above plus all unused images, not just dangling ones. | Medium. |
docker system prune --volumes | Adds unused anonymous volumes. | High if any anonymous volume holds data you need. |
docker volume prune | Unused anonymous volumes. Named volumes are left alone. | High for anonymous volumes with data. |
docker volume prune -a | All unused volumes, including named ones. | Highest. This is how local databases disappear. |
Volume warning: a volume that is "unused" only means no container is attached to it right now. If you ran docker compose down on a project with a Postgres, MySQL or MongoDB service, its volume is unused but still holds the database. Run docker volume ls and back up anything you care about before pruning volumes.
What is a safe order to free Docker disk space?
- Run
docker system df -vand note the large items. - Run
docker container pruneto remove stopped containers. - Run
docker buildx pruneto clear dangling build cache, often the biggest quick win on machines that build a lot. - Run
docker image prune -aif you are fine re-pulling images. - Review volumes one by one and remove specific ones with
docker volume rm <name>, rather than pruning blindly. - Check the real size of Docker.raw again with
ls -klsh.
Docker's Mac FAQ notes that space is not always freed automatically when files are deleted inside running containers, so the file may not shrink straight away.
How do I limit how big Docker.raw can get?
Open Docker Desktop, go to Settings > Resources > Advanced and adjust the Disk usage limit, then select Apply. Docker's FAQ warns that reducing the maximum size deletes the current disk image, so all containers and images are lost. Back up volumes first. In the same section you can move the disk image to a larger drive using the Browse option inside Docker Desktop. Do not move it in Finder.
The same Resources section also sets the VM's memory limit. If Docker is using a lot of RAM rather than disk, lower that limit; see how to check memory usage on a Mac.
What about OrbStack and Colima?
OrbStack and Colima are alternative ways to run Docker containers on a Mac. They store their data in their own locations, not in Docker Desktop's Docker.raw, but the same docker system df and prune commands work against whichever engine your docker CLI is pointing to. Check docker context ls to see which one that is, and use each tool's own documentation for its disk settings.
Can WTMemory clean Docker data?
No, by design. WTMemory's cleanup covers supported AI model folders and developer caches such as Xcode DerivedData and npm, pnpm, Yarn, Bun, Cargo and Gradle caches. Docker VM data is excluded, because it can contain databases and work that cannot be recreated, and only Docker knows which parts are safe to remove.
What it can do, for free:
- Running Apps shows Docker Desktop alongside your other apps, with memory, CPU, PID and ports. Each row is one process, so Docker's VM and helper processes may use more than the row shows; use Activity Monitor for the full picture.
- Disk Explorer is read-only. Point it at a folder such as
~/Library/Containersto compare folder sizes and find the largest files, then reveal them in Finder. It never deletes anything.
WTMemory is a native menu-bar app for macOS 12 or later on Apple Silicon and Intel. Inspection is free; Pro is $9 USD once for up to 3 Macs, with a 7-day trial.
FAQ
Where does Docker store data on a Mac?
Docker Desktop keeps Linux images, containers, volumes and build cache inside one disk image file, by default at ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw. The exact location is shown in Settings > Resources > Advanced.
Is it safe to delete Docker.raw?
Do not delete it in Finder while Docker is running. Deleting or resetting it removes every image, container and volume, including database data in volumes. Use the prune commands or Docker Desktop's own troubleshoot and reset options instead.
Does docker system prune delete volumes?
Not by default. docker system prune removes stopped containers, unused networks, dangling images and unused build cache. Adding --volumes also removes unused anonymous volumes. Named volumes are only removed by docker volume prune -a.
Why is Docker.raw still big after pruning?
Docker.raw is a sparse file, so Finder and some tools may show its maximum size rather than the space it actually uses. Check the real usage with ls -klsh. Docker also notes that space is not always freed automatically when files are deleted inside running containers.
Can WTMemory clean Docker data?
No. WTMemory excludes Docker VM data from cleanup by design, because it can contain databases and other data that cannot be recreated. It can show Docker's memory and CPU in Running Apps, and its read-only Disk Explorer can show folder sizes.
Sources, checked 13 October 2026: Docker Desktop for Mac FAQ, Prune unused Docker objects, Docker Desktop settings.