Where apps hide your files
Docker Desktop on a Mac stores everything in a single sparse disk image, so Finder may claim it is hundreds of gigabytes while it uses a few. This post gives the exact path, explains the size, and shows how to shrink, move or remove it safely.
Docker Desktop keeps every Linux image, container and volume in one large disk image file:
~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
That is the default, and Docker's own documentation gives the same path. If you moved the image, or want to confirm, open Docker Desktop's Settings > Resources > Advanced: it shows the disk image location, its maximum size and the space it actually uses. Very old releases used a Docker.qcow2 file instead, so if the path above is missing, list the folder:
ls -la ~/Library/Containers/com.docker.docker/Data/vms/0/data
Open it in Finder with Go > Go to Folder (⇧⌘G), or open ~/Library/Containers/com.docker.docker/Data/vms/0/data.
Docker.raw is a sparse file. Its apparent size is the maximum the virtual disk may grow to, not the space it takes, so Finder and ls -l can report hundreds of gigabytes for a file that occupies a few. Docker's documentation suggests this check, where the first column is the real size:
cd ~/Library/Containers/com.docker.docker/Data/vms/0/data
ls -klsh Docker.raw
du -sh Docker.raw in the same folder gives the same real figure. Disk-usage tools that report apparent size will overstate it, which is why the Advanced settings pane is the better guide.
One catch, in Docker's own words: space is reclaimed when images are deleted, not when files are deleted inside running containers. You can free space inside a container and still see the file stay the same size.
| Path | What it is |
|---|---|
~/Library/Containers/com.docker.docker/Data/ | Sockets such as backend.sock and docker-cli.sock, the vms folder, logs and runtime state |
~/Library/Group Containers/group.com.docker/ | Settings (settings-store.json on recent versions), account state and feature flags |
~/Library/Application Support/Docker Desktop/ | The dashboard's own caches and window state |
~/.docker/ | CLI config, contexts, daemon.json, buildx and CLI plugins |
Do not open login-info.json, config.json or other files that may hold account or registry credentials. Listing names is fine.
Start from inside Docker, which knows what is in use.
docker system df -v.docker system prune. Add -a to remove all unused images, not just dangling ones, and read the confirmation prompt, because it lists what goes. Volumes are left alone unless you add --volumes, which prunes anonymous volumes; check what you have first with docker volume ls, since volumes can hold databases.docker builder prune.Host space can take a few minutes to come back after pruning. Docker documents a command that triggers the reclaim straight away:
docker run --privileged --pid=host docker/desktop-reclaim-space
Never delete Docker.raw in Finder while Docker runs, and think before deleting it at all: it destroys every image, container and volume stored in it.
To move the image to a bigger drive, go to Settings > Resources > Advanced, choose Browse under Disk image location, pick the new folder and select Apply. Docker moves the file itself. Do not move it in Finder: Docker's documentation warns that Docker Desktop can lose track of it.
The same pane has the size limit (a Disk image size slider in older versions, Disk usage limit in recent ones). Docker's FAQ is blunt about lowering it: the current disk image is deleted, and all containers and images are lost. Push or save anything you need first.
The disk image is not a backup format. To keep your work:
docker save -o myimage.tar myimage:tag, then docker load -i myimage.tar on the new Mac. Better still, push them to a registry.--volumes-from and writes a tar archive to a bind-mounted folder.compose.yaml, which belong in version control.Time Machine does not skip Docker.raw on its own; check with tmutil isexcluded followed by the file's path. A copy taken while Docker is running may not be consistent, so rely on the exports above rather than on a backed-up disk image.
Dragging Docker.app to the Trash leaves the disk image behind, often several gigabytes of it. Docker's supported route is Troubleshoot > Uninstall before you trash the app, which removes containers, images, volumes and other local data. If the app is already gone, quit any Docker processes and move these to the Trash in Finder: ~/Library/Containers/com.docker.docker, ~/Library/Group Containers/group.com.docker and ~/.docker. If you use Terminal instead, Docker's uninstall page notes it may need Full Disk Access to remove the Containers folder.
To check whether a stray Docker.raw, an old Docker.qcow2 or a leftover com.docker folder is still sitting around from a previous install, type Docker.raw or com.docker into Everywhere. Once it has Full Disk Access, it lists matches from inside ~/Library/Containers and Group Containers, where Spotlight shows nothing, and ⌘↵ reveals the file in Finder. It searches names, not contents, so it will not tell you what is inside an image.
By default in ~/Library/Containers/com.docker.docker/Data/vms/0/data/. Docker Desktop's Settings > Resources > Advanced shows the current location if it was moved.
It is a sparse file, so the size shown is the maximum the virtual disk can reach. Run ls -klsh Docker.raw in its folder, or du -sh, to see the space actually used.
Only if you accept losing every image, container and volume in it, and never while Docker runs. Prefer docker system prune, or Clean up data in Docker Desktop's Troubleshoot menu.
In Settings > Resources > Advanced, choose Browse under Disk image location, pick a folder and select Apply. Docker moves the file itself; do not move it in Finder.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised