---
title: "Why Docker.raw Is So Big on Mac and How to Shrink It"
url: https://pixeldisk.app/guides/docker-disk-space-mac/
description: "Docker.raw holds every image, container, volume and build cache. Check it with docker system df, prune by kind, and know when deleting it resets Docker."
---

# Why Docker.raw takes so much space on Mac and how to shrink it

By [itsnex1s](https://pixeldisk.app/about/) Published November 15, 2026

Docker Desktop on Mac keeps all images, containers, volumes and build cache in one disk image, `Docker.raw`, in `~/Library/Containers/com.docker.docker/Data/vms/0/data` ([Docker Docs](https://docs.docker.com/desktop/troubleshoot-and-support/faqs/macfaqs/)). Run `docker system df` to see what fills it, then prune by kind. Deleting `Docker.raw` itself erases every container and image.

## Why Docker.raw grows

macOS can’t run Linux containers directly, so Docker Desktop runs a Linux VM. That VM’s disk is `Docker.raw`. Each image you pull, each layer you build and each volume you create lives inside it.

Two things make it confusing:

- **It’s a sparse file.** Docker’s FAQ shows an example where `ls -klsh Docker.raw` reports about 2.3 GB in use against a 64 GB maximum. Other tools may “display space usage of the file in terms of the maximum file size, and not the actual file size” ([Docker Docs](https://docs.docker.com/desktop/troubleshoot-and-support/faqs/macfaqs/)).
- **Build cache is invisible.** `docker images` doesn’t show it, but repeated builds can leave a lot of it behind.

Check the real size first:

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

The first number is the space the file really uses.

## See what is inside

 `docker system df docker system df -v`

`docker system df` “displays information regarding the amount of disk space used by the Docker daemon” ([Docker Docs](https://docs.docker.com/reference/cli/docker/system/df/)). It shows images, containers, local volumes and build cache, each with a RECLAIMABLE column. The `-v` flag lists every image and volume.

## Clean up by kind

Start with the cheapest kind to lose. Docker Desktop must be running.

| Command | Removes | Cost |
| --- | --- | --- |
| `docker builder prune` | Unused build cache | Next build is slower |
| `docker container prune` | Stopped containers | Their writable layer is lost |
| `docker image prune` | Dangling images (untagged) | Usually nothing |
| `docker image prune -a` | All images not used by a container | Pull or build again |
| `docker volume prune` | Unused volumes | **Data in them is lost** |
| `docker system prune` | Stopped containers, unused networks, dangling images, unused build cache | Small |
| `docker system prune -a --volumes` | All of the above, every unused image, unused anonymous volumes | Large, data can be lost |

 `# safest first step docker builder prune # broader cleanup, keeps volumes docker system prune`

### The risk with prune -a and –volumes

`docker system prune -a` removes “all unused images not just dangling ones” ([Docker Docs](https://docs.docker.com/reference/cli/docker/system/prune/)). An image used only by a stopped container counts as unused once that container is gone. You then pull or build it again.

Volumes are kept by default “to prevent important data from being deleted” ([Docker Docs](https://docs.docker.com/reference/cli/docker/system/prune/)). A local database often lives in a volume. Don’t add `--volumes` unless you know what each volume holds.

## Does pruning shrink Docker.raw?

Pruning frees space inside the VM. Because `Docker.raw` is sparse, the file’s real size usually drops too. Docker’s FAQ also lists a helper to reclaim space. It runs a privileged container with access to host processes, and only compacts Docker’s own VM disk:

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

## Reset or resize Docker.raw

In Docker Desktop, Settings > Resources > Advanced shows the disk image location and the disk usage limit ([Docker Docs](https://docs.docker.com/desktop/settings-and-maintenance/settings/)). Docker warns that lowering the size deletes the current disk image, and “all containers and images are lost” ([Docker Docs](https://docs.docker.com/desktop/troubleshoot-and-support/faqs/macfaqs/)).

Deleting `Docker.raw` by hand has the same effect. Do it only when you want a clean Docker. Quit Docker Desktop first.

## OrbStack, Colima and Lima

Other Docker runtimes use their own disks:

- **OrbStack** keeps data in `~/Library/Group Containers/HUAQ24HBR6.dev.orbstack/data`. Its `data.img` is sparse and “automatically shrinks when you delete data” ([OrbStack Docs](https://docs.orbstack.dev/faq)).
- **Colima** lives under `~/.colima`. It releases free space on startup from v0.5.0, or on demand with `colima ssh -- sudo fstrim -a`. `colima delete` keeps container data in v0.9.0 and later; `colima delete --data` removes it ([Colima FAQ](https://colima.run/docs/faq/)).
- **Lima** keeps each instance in `~/.lima/<instance>/`. Remove an instance with `limactl delete` ([Lima FAQ](https://lima-vm.io/docs/faq/)).

## Do it in PixelDisk

[PixelDisk](https://pixeldisk.app/) reads `docker system df` and lists images, containers, volumes and build cache as separate items, each with its size and cost. It also shows VM disks from Docker Desktop, OrbStack, Colima and Lima. Docker data is removed with Docker’s own prune commands, not through the Trash, so it can’t be put back; every removal is still logged in History. Docker and VM disks are in the direct download edition, and cleaning is a $19 one-time unlock ([pricing](https://pixeldisk.app/pricing/)). For other developer space, see [Xcode DerivedData and simulators](https://pixeldisk.app/guides/clear-xcode-deriveddata/) and [what System Data is](https://pixeldisk.app/guides/system-data-mac/).

## Sources

Checked November 2026.

- Docker Docs, FAQs for Docker Desktop for Mac: [https://docs.docker.com/desktop/troubleshoot-and-support/faqs/macfaqs/](https://docs.docker.com/desktop/troubleshoot-and-support/faqs/macfaqs/)
- Docker Docs, docker system prune: [https://docs.docker.com/reference/cli/docker/system/prune/](https://docs.docker.com/reference/cli/docker/system/prune/)
- Docker Docs, docker system df: [https://docs.docker.com/reference/cli/docker/system/df/](https://docs.docker.com/reference/cli/docker/system/df/)
- Docker Docs, Change your Docker Desktop settings: [https://docs.docker.com/desktop/settings-and-maintenance/settings/](https://docs.docker.com/desktop/settings-and-maintenance/settings/)
- OrbStack Docs, FAQ: [https://docs.orbstack.dev/faq](https://docs.orbstack.dev/faq)
- Colima, FAQ: [https://colima.run/docs/faq/](https://colima.run/docs/faq/)
- Lima, FAQ: [https://lima-vm.io/docs/faq/](https://lima-vm.io/docs/faq/)

## Do it in one click

PixelDisk finds this for you, shows what each item costs to lose, and in Safe mode keeps your files in the Trash so you can put them back.

 Coming soon [$19 once to clean](https://pixeldisk.app/pricing/)

## Questions

### Can I delete Docker.raw?

Yes, but it resets Docker Desktop. Docker.raw holds all your images, containers and volumes, so every one of them is lost. Export volumes you need first, or prune by kind instead.

### Why does Finder show Docker.raw as 64 GB when my disk didn't shrink by that much?

Docker.raw is a sparse file. Finder can show its maximum size, not the space it really uses. Run ls -klsh on the file to see both numbers.

### Is docker system prune safe?

It removes stopped containers, unused networks, dangling images and unused build cache. With -a it also removes every image not used by a container, which you then pull or build again. Volumes are kept unless you add --volumes.

### Does OrbStack have the same problem?

OrbStack stores data in a sparse data.img that its docs say shrinks automatically when you delete data. Removing images and containers inside OrbStack is usually enough.

## Get your disk space back.

Scan free. Clean for $19, once. Your files go to the Trash first.

Coming soon
