Why Docker uses so much disk space on a Mac

Docker Desktop keeps containers and images in one disk image file. Here is how to find it, read its real size, see what fills it, and free space without losing a volume. Every step from Docker's and Apple's own documentation.

Updated 3 Nov 2026. Every fact here is from Docker's or Apple's own documentation, linked where it is used, read on 3 Nov 2026.

One file holds it all

Docker's documentation: "Docker Desktop stores Linux containers and images in a single, large "disk image" file in the Mac filesystem. This is different from Docker on Linux, which usually stores containers and images in the /var/lib/docker directory." (Docker Desktop for Mac FAQ)

So on a Mac, Docker's containers and images do not show up as folders you can open. They show up as one file.

Find the file

In Docker Desktop, open Settings, then Resources, then Advanced. Docker says this tab "displays the location of the disk image. It also displays the maximum size of the disk image and the actual space the disk image is consuming."

Docker's own example puts it here:

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

Read its real size, not its maximum

Docker warns: "Note that many tools report the maximum file size, not the actual file size." To see the actual size, Docker gives this:

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

The first number is the space the file really uses, in KB. The size later on the line is the maximum.

Why the two differ: Docker.raw is a sparse file. Apple's documentation on APFS: "on-disk blocks are allocated only when those blocks are actually written to. This behavior lets files that contain blank sections, such as disk images and database dumps, be saved on disk more efficiently." (About Apple File System)

See what fills it

docker system df -v

Docker: "You can see the detailed space usage information by running" this. docker image ls lists images and docker container ls -a lists containers, stopped ones included.

Free space, least risk first

  1. Prune what nothing uses. First, Docker's own words: this "removes all stopped containers". So list them before you run it, with docker container ls -a, and keep any you still need.
    docker container ls -a
    docker system prune

    Docker: it "removes all stopped containers, unused networks, dangling images, and build cache." Its pruning guide adds: "Volumes aren't pruned by default." (Prune unused Docker objects)

  2. Remove images you no longer use, after checking the list from docker image ls. Docker: "Space is only freed when images are deleted. Space is not freed automatically when files are deleted inside running containers."
  3. Move the disk image to a bigger drive, in Settings, Resources, Advanced, Disk image location. Docker: "Do not move the file directly in Finder as this can cause Docker Desktop to lose track of the file."
  4. Lower the maximum size only if you can lose everything inside. Docker: "When you reduce the maximum size, the current disk image file is deleted, and therefore, all containers and images are lost."

Leave volumes alone unless you know what they hold

Docker: "Volumes are never removed automatically, because to do so could destroy data." docker system prune --volumes removes unused anonymous volumes; named unused volumes are left alone unless you run docker volume prune --all (Docker's pruning guide). Know what each volume holds before you run either.

Sources

Quick answers

Where does Docker Desktop keep its data on a Mac?

In one large disk image file. Docker Desktop shows where it is in Settings, Resources, Advanced. Docker's own example of its location is ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw. Source: Docker Desktop for Mac FAQ.

Why does Docker.raw look bigger than it is?

Docker says many tools report the disk image's maximum size, not its actual size. On APFS, a sparse file uses disk blocks only for what has been written. To see the real size, run ls -klsh Docker.raw in its folder: the first number is the actual size in KB.

Is docker system prune safe?

It removes stopped containers, unused networks, dangling images and build cache. It does not remove volumes unless you add --volumes. Docker never removes volumes automatically, "because to do so could destroy data". Source: Prune unused Docker objects.

Can I delete Docker.raw in Finder?

Docker's FAQ says not to move the file directly in Finder, because Docker Desktop can lose track of it. Change its location or size in Docker Desktop's settings instead. Reducing the maximum size deletes the file, and with it all containers and images.

Hear when it launches.

One email when Spaceific launches, and a notice 24 hours before the founder licences open. Nothing else.

Three optional questions
Tools you use (pick any)
Free space now
Biggest storage problem

Send me one email when Spaceific launches, and a notice 24 hours before the founder licences open. Nothing else unless I tick it. Unsubscribe in one click. Privacy.