Docker.raw on Mac: what it is and how to shrink it
MACMAN FOLDER · 2026-11-16
~/Library/Containers/com.docker.docker
What it is
~/Library/Containers/com.docker.dockerShrink inside the appDocker Desktop virtual machine disk (a single file, Docker.raw) — all images, containers and volumes live inside it
Why it grows
Docker Desktop runs inside a Linux virtual machine and keeps every image, container and volume in a single virtual disk file called Docker.raw. Each time you pull or build an image, that file fills up.
Deleting containers or images inside Docker does not always shrink the file you see on the Mac right away. Unused images and build cache pile up, and on the Mac side it still looks like one large file.
That is why deleting the file in Finder and cleaning up inside Docker give very different results. The first loses everything inside it at once.
Before you delete
~/Library/Containers/com.docker.dockerDeleting it whole removes all images, containers and volumes, including database data. To undo, restore it from the holding area before you open Docker again — with Docker running, expand it to choose images, containers and volumes one by one
How to shrink it inside the appDelete unused images, containers and build cache inside Docker Desktop — leave volumes (database data) alone
docker image prune -a && docker builder prune
How to check its size
In Finder, choose Go > Go to Folder (Shift-Command-G), enter ~/Library/Containers/com.docker.docker, then use Get Info (Command-I) to see the size.
In Terminal, run du -sh ~/Library/Containers/com.docker.docker to see the size.
Docker.raw sits deep inside this folder. Docker Desktop also shows the disk image's location and the space it actually uses under Settings > Resources > Advanced.
The free MacMan Scan diagnosis lists this folder with its size and grade. The scan is read-only.
How to shrink it safely
- Do not delete the Docker.raw file in Finder. Every image, container and volume inside it would be gone.
- With Docker Desktop running, enter
docker image prune -a && docker builder prunein Terminal. Each part asks you to confirm before it deletes anything. -adeletes every image that no container uses. Any image you need later has to be pulled or built again.- Leave volumes alone. They can hold real data such as databases.
- If the size still does not drop as much as you expect, check in Docker Desktop which images and volumes remain before you delete anything else.
How MacMan Scan handles this folder
MacMan Scan never offers this whole folder as one checkbox. With a license and Docker Desktop running, you can expand the row and pick individual images, containers, volumes and build cache. Those deletions go through Docker right away and cannot be undone.
Related folders
- Colima folder (~/.colima) on Mac: what it is and whether you can delete it
- OrbStack folder (~/.orbstack) on Mac: what it is and whether you can delete it
- UTM virtual machine folder on Mac: what it is and whether you can delete it
- Library/Containers on Mac: what it is and whether you can delete it
The scan is read-only. Diagnosis alone deletes nothing.