Is it safe to delete com.docker.docker on Mac?

Safe with care~/Library/Containers/com.docker.docker

Only with care. Docker Desktop keeps every image, container and volume in one disk image there. See its real size and free space with prune, not Finder.

Updated 16 November 2026 · 4 min read

Verdict: Safe with care. Deleting ~/Library/Containers/com.docker.docker removes every Docker image, container, volume and build cache entry on your Mac, including any database data in volumes, and none of it comes back by itself. Free space from inside Docker with the prune commands instead, and use Docker Desktop's own reset if you want to start from nothing.

What lives in com.docker.docker

Docker containers need Linux, so Docker Desktop runs a small Linux virtual machine. That machine keeps all its data in one large disk image file, Docker.raw. Docker's Mac FAQ gives its location as ~/Library/Containers/com.docker.docker/Data/vms/0/data. Inside that one file are:

  • Images you pulled or built, including old versions left after rebuilds.
  • Containers, running and stopped.
  • Volumes, where databases and other services keep their data.
  • Build cache, the layers that make rebuilds fast.

The rest of the com.docker.docker folder holds Docker Desktop's own working files. If you changed Disk image location in Docker Desktop's settings, the big file lives wherever you moved it.

What happens if you delete it

  • Rebuilds by itself: nothing. Containers and volumes start from empty, and no image comes back unless you pull or build it.
  • Comes back with effort: public images you can pull again, and images you can rebuild from a Dockerfile. Both take time and bandwidth.
  • Lost for good: anything only stored in a volume or inside a container, such as a local development database, uploaded files or test data, and images you built but never pushed to a registry.

Docker's FAQ also warns against moving the disk image in Finder, because Docker Desktop can lose track of it.

How to check its size safely

The folder sits inside ~/Library/Containers, which macOS keeps private. Running du there from Terminal can bring up a request to let Terminal access data from other apps, or print "Operation not permitted". Docker's own way to read the size is simpler:

cd ~/Library/Containers/com.docker.docker/Data/vms/0/data
ls -klsh Docker.raw

This changes nothing. The first number is the space the file really takes up; the size further along is the maximum it may grow to. Docker warns that many tools report the maximum, which is why the file can look far bigger than it is.

To see what Docker is holding, with Docker Desktop running:

docker system df

This prints a table of images, containers, local volumes and build cache, with how much of each is reclaimable. It only reads.

In Finder, choose Go > Go to Folder, paste ~/Library/Containers/com.docker.docker/Data/vms/0/data, select Docker.raw and choose File > Get Info.

The safest way to get the space back

Work from the smallest step up. Each prune command asks you to confirm before deleting.

  1. Remove stopped containers with docker container prune.
  2. Remove dangling images with docker image prune, or every image no container uses with docker image prune -a.
  3. Clear the build cache with docker builder prune.
  4. Check volumes with docker volume ls before you remove any, then use docker volume prune for anonymous volumes nothing uses.
  5. Or do the first steps in one go:
docker system prune

Docker's documentation for this command explains that by default it removes stopped containers, unused networks, dangling images and build cache. Adding -a removes all unused images; adding --volumes removes anonymous volumes.

Warning: prune commands delete for good, and there is no Bin. Export any database you need from a volume first.

Freed space can take a few minutes to show on the Mac. If you want a completely fresh start, open Docker Desktop's Troubleshoot menu and choose Clean up data, which wipes containers and images but keeps your settings. Warning: it removes everything Docker holds on this Mac.

Lowering the disk limit is not a gentle trim either. Docker's FAQ warns that reducing the maximum size deletes the current disk image, so all containers and images are lost.

What never to touch

  • Docker.raw while Docker Desktop is running. Quit Docker Desktop before you do anything to the file directly.
  • Volumes you have not checked. A named volume nothing is using right now may still hold the only copy of a database.
  • The folder in Finder. Moving or dragging it can leave Docker Desktop unable to find its data. Use Disk image location in Docker's settings to move it to another drive.

Our guide to Docker Desktop disk space on Mac covers each prune step in detail. Before blaming Docker, check other app data in Library/Containers and Application Support.

How Headroom helps

Headroom never touches Docker's data, because what is in it, from images to databases, is yours to judge. Its Space map shows where the space sits: Library, then Containers, noted as "Data for sandboxed apps", with Docker's folder sized as a block and Show in Finder on every row. That tells you quickly whether Docker is the problem before you start pruning. The map is free. The $19 one-time licence adds the clearing tools elsewhere in the app. See the disk space map or download Headroom.

Questions

What is Docker.raw on my Mac?

It is the disk image of the Linux virtual machine Docker Desktop runs. Every image, container, volume and build cache entry lives inside it, in ~/Library/Containers/com.docker.docker/Data/vms/0/data unless you moved it in Docker's settings.

Why does Docker.raw look so big?

Many tools show the file's maximum size rather than the space it really uses. Docker's FAQ gives ls -klsh Docker.raw, where the first number is the real usage.

Can I delete Docker.raw to free space?

Only if you are happy to lose every image, container and volume on this Mac. Use docker system prune for unused items, or Docker Desktop's Clean up data option for a full reset, rather than deleting the file in Finder.

Will docker system prune delete my volumes?

Not by default. docker system prune removes stopped containers, unused networks, dangling images and build cache. Volumes only go if you add --volumes.