Folder

Is Docker.raw safe to delete on a Mac?

Not by hand: Docker.raw is the single disk that holds every Docker image, container and volume on your Mac, so deleting it loses all of them; shrink it with docker system prune instead.

1 safe2 careful2 never

updated read 4 minfor Docker Desktop for Mac on macOS 14 Sonoma and later

The short answer

  1. 01

    Careful. Docker.raw, in ~/Library/Containers/com.docker.docker/Data/vms/0/data, is Docker Desktop's Linux disk with all images, containers and volumes.

  2. 02

    Docker Desktop writes it as you pull images, build and run containers. Docker says space is not freed automatically when files are deleted inside running containers.

  3. 03

    Deleting it loses everything in Docker: images, containers, volumes and build cache. Docker Desktop creates a new, empty disk.

  4. 04

    The command: docker system prune removes stopped containers, unused networks, dangling images and build cache, without touching the file by hand.

See its real size on your Mac. Hoardless measures this folder and previews the delete.Download free trial

What is Docker.raw?

Docker.raw is the virtual disk of the Linux machine Docker Desktop runs on your Mac. Docker's documentation says Docker Desktop stores Linux containers and images in a single, large disk image file, by default at ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw.

Everything Docker holds is inside it: images, containers, volumes and the build cache. macOS sees one file, not your containers, so Finder and Storage settings cannot tell you what inside it is safe to drop.

Docker Desktop's Settings > Resources > Advanced shows the real location and the maximum disk size.

What writes it and why does it grow?

Every docker pull, build and run writes into it. The file grows as the Linux disk fills and does not shrink just because something inside was deleted.

  • Images and layers from every pull and build, including old tags you no longer run.
  • Build cache from docker build, kept to speed up the next build.
  • Stopped containers and volumes: a stopped container keeps its writable layer, and volumes keep their data until removed.
  • Deleted files inside running containers: Docker says that space is not freed automatically. It comes back when images are deleted or the space is reclaimed.

How big does Docker.raw get?

It can grow up to the Disk image size set in Docker Desktop, and no further. How close it gets depends on what you run. Check the real usage, not the maximum:

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

Docker's own check. The first number is the space really used; the larger number is the maximum. Removes nothing.

docker system df

Shows how much of that space is images, containers, volumes and build cache, and how much of each is reclaimable. Docker must be running.

Is it safe to delete Docker.raw?

Only if you accept losing everything in Docker. Docker's documentation says that when the disk image is deleted, all containers and images are lost.

WhatVerdictWhat you lose
docker system pruneSafeStopped containers, unused networks, dangling images and unused build cache. Volumes stay.
docker system prune -aCarefulAlso every image no container uses. They download or rebuild again.
Adding --volumesCarefulAnonymous volumes and their data, such as a database a container created.
Docker.raw moved to the TrashNever unless you want a resetEvery image, container, volume and the build cache.
The whole com.docker.docker containerNeverAll Docker data and Docker Desktop's settings.

How do I shrink Docker.raw?

Use Docker's own commands first. The docker system prune reference describes each flag:

docker system prune

Removes stopped containers, networks no container uses, dangling images and unused build cache. Asks before it runs.

docker system prune -a

Also removes all unused images, not just dangling ones.

docker system prune -a --volumes

Also prunes anonymous volumes. Check docker volume ls first.

Docker notes that reclaiming space on the host can take a few minutes after a prune. To reset everything on purpose, lower Disk image size in Settings > Resources > Advanced: Docker says this deletes the current disk image and all containers and images with it.

What Hoardless does: its Docker detector lists Docker.raw at the Confirm tier and cleans it by running docker system prune -a --volumes -f, never by trashing the file. The plan shows that command before it runs. If the docker command is missing, the row says so and nothing is removed. Its Unused view separately lists images no container has ever used that are untagged or were pulled over 90 days ago, removed with docker image rm after you confirm.

What comes back and when?

Images come back when you pull or build them again; volumes do not. After a prune, the next docker compose up or docker build downloads base images and rebuilds layers, so expect it to be slow once. Data in a pruned volume is gone for good.

The file grows again as you work. Set a lower Disk image size if you want a hard cap.

See what Docker holds before you prune

Hoardless lists Docker.raw at the Confirm tier with the exact command it will run (docker system prune -a --volumes -f), and its Unused view lists old unused images one by one, removed with docker image rm after you confirm.

14-day full trial. macOS 14 or later.

Questions

Why is Docker.raw so big?

It holds every image, container, volume and build cache in one file. Docker's documentation notes that some tools report the file's maximum size, not the space it really uses, so check it with ls -klsh.

Can I just move Docker.raw to the Trash?

Not while you want to keep anything in Docker. Docker Desktop then starts with a fresh disk, and every image, container and volume is gone. Docker also warns against moving the file in Finder.

Does docker system prune delete my volumes?

Not by default. Docker's reference says volumes are not removed unless you add --volumes, and that flag prunes anonymous volumes.

How do I move Docker.raw to another drive?

In Docker Desktop, open Settings > Resources > Advanced and change Disk image location, then Apply. Docker moves it and keeps track of the new path.