Skip to content

Blog

Why Docker.raw takes up so much space on your Mac

What Docker Desktop’s Docker.raw file is, why it can look far bigger than it is, and how to get space back without losing your containers.

· Sources

On this page

If you use Docker Desktop, one of the biggest files on your Mac may be Docker.raw. This guide explains what it is, why its size can look alarming, and how to make it smaller, using Docker’s own documentation.

What is Docker.raw?

Docker Desktop keeps its Linux containers and images in a single, large disk image file on your Mac. In Docker’s documentation, that file is Docker.raw.

So Docker.raw isn’t a cache or a log. It holds the images and containers you have in Docker Desktop.

Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab).

Where is Docker.raw on a Mac?

Docker Desktop shows where its disk image is:

  1. Open Docker Desktop.
  2. Select Settings, then Resources, then Advanced.

The Advanced tab shows the disk image’s location, its maximum size, and how much space it really uses. In Docker’s own example, the file is in:

Folder
~/Library/Containers/com.docker.docker/Data/vms/0/data

Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab).

Why does Docker.raw look so big?

Docker.raw has a maximum size and an actual size, and the two can be very different. Docker notes that many tools report the maximum size, not the space the file really takes.

To see the actual size, run this in Terminal:

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

In Docker’s example, the maximum size is 64 GB, but the file really uses 2,333,548 KB.

The actual size grows as you pull images and create containers. Deleting files inside a running container doesn’t make it smaller. Space is only freed when images are deleted.

Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab).

How to make Docker.raw smaller

Start by seeing what’s using the space:

Terminal
docker system df -v

docker image ls and docker container ls -a list your images and containers one by one. Then remove what you no longer need:

Terminal
docker system prune

This removes stopped containers, networks no container uses, dangling images and unused build cache. It asks you to confirm first.

Docker says the space can take a few minutes to come back to your Mac. To reclaim it straight away:

Terminal
docker run --privileged --pid=host docker/desktop-reclaim-space

Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab) and Prune unused Docker objects (opens in a new tab).

Can I delete Docker.raw?

Docker’s documentation doesn’t give steps for deleting Docker.raw by hand. It does say what happens when Docker Desktop replaces it: when you lower the disk image’s maximum size, the current file is deleted, and all containers and images are lost.

If you want the space back and still need your images, prune them as above instead.

Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab).

Move it to another drive, or lower its limit

Both settings are in Docker Desktop, under Settings › Resources › Advanced.

  • Move it. In Disk image location, select Browse, choose a new location, then select Apply.
  • Lower its maximum size. Drag the Disk image size slider to a lower limit, then select Apply. This deletes the current disk image, with every container and image in it.

Source: Docker Docs, FAQs for Docker Desktop for Mac (opens in a new tab).

Sources

Every source was checked on 2 November 2026, against macOS 27.

Disk Census lists Docker Desktop’s disk image with your other developer files, and marks it as one to keep, because deleting it removes every image, container and volume.

See how Disk Census works