← Back to All 28+ Guides / Developer Storage Guide
DEVELOPER STORAGE GUIDE • 7 MIN READ

Docker on Mac Storage Nightmare: Reclaiming 60GB from Docker.raw

Why Docker Desktop's virtual disk file (Docker.raw) fails to shrink after deleting containers, and how to safely compact container storage on macOS.

Published: 2026-09-12 By XrayMac Engineering 100% Native Swift

Because macOS does not run a native Linux kernel, Docker Desktop executes within a lightweight virtual machine. That virtual machine stores all containers, images, and volumes inside a single large virtual disk file: Docker.raw.

The Non-Shrinking Sparse File Problem

When you pull a 5GB Docker image, Docker.raw expands to fit it. However, when you delete that image with docker rmi, the virtual disk file does not shrink automatically on macOS APFS. It remains allocated at its peak size (frequently 64GB).

XrayMac detects Docker virtual disk bloat, compares actual container payload with allocated disk size, and provides automated compacting to reclaim space without losing vital volumes.

Free To Download

Experience Fast, Native Mac Storage

Download XrayMac for free. Inspect your storage, visualize disk hogs, and explore your drives with 100% on-device privacy. Optional upgrades can be activated anytime directly within the app if you ever need them.