Theme
FeaturesHow It WorksPricingBlogSign In to Dashboard →Download Mac App
← All posts
Developer Toolchain

Docker.raw Is Huge on Mac: How to Shrink It Without Losing Data

The Silo Team · 6 min read · September 22, 2026

Why Docker.raw Grows Without Limit

Docker Desktop on macOS stores all its container data inside a sparse virtual disk image: Docker.raw. This file is located at:

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

The problem: sparse virtual disks grow to accommodate data but never automatically shrink. When you pull a 5 GB image, delete it, and pull another, Docker.raw grows to accommodate each one sequentially. The freed space inside the VM is not reclaimed to the host filesystem.

Step 1: Prune Everything Inside Docker

First, remove what you no longer need inside Docker:

# Remove stopped containers, dangling images, unused networks, volumes
docker system prune --volumes -f

# Remove all unused images (not just dangling)
docker image prune -a -f

# Remove all BuildKit cache
docker builder prune --all -f

# Check how much space Docker is actually using
docker system df -v

Step 2: Compact the Virtual Disk

After pruning, you need to tell the VM to compact the sparse disk:

# Quit Docker Desktop first, then:
# For macOS using virtualization framework
qemu-img convert -O qcow2 Docker.raw Docker.qcow2
# Or use Docker Desktop's built-in disk cleanup:
# Docker Desktop → Settings → Resources → Advanced → Virtual Disk Limit → Apply & Restart

Using MacPilot's Docker Companion

MacPilot shows you the actual vs. allocated size of Docker.raw in real-time via the Docker socket. When the delta exceeds a configurable threshold, it prompts you to run a safe prune. It also monitors container states, dangling volumes, and BuildKit cache accumulation — all without opening Docker Desktop's electron interface.

Colima and Podman Users

Similar sparse disk patterns affect Colima (~/.local/share/colima/default/docker.disk) and Podman machines. MacPilot detects all three runtime types and applies the same monitoring and cleanup logic.

See it on your own Mac.

Download Silo and find out where your space is going.

Download Silo →

Keep reading

Silo Support Desk

Help & Feedback

Send a message to our engineering team. We typically respond within 12 hours.

Direct email support: sparoconnect@gmail.com