Space Consumers — VMs and Containers
Docker Desktop
Docker Desktop stores its Linux VM’s entire virtual disk as a single file:
~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
This is an APFS sparse file. This is crucial:
ls -lh Docker.rawshows the logical (maximum allocated) size — e.g., 60 GBdu -sh Docker.rawshows the physical (actually written) size — e.g., 15 GB
After docker system prune -a --volumes, the physically written blocks shrink, but the logical size stays the same until the sparse file is compacted. The OS will gradually reclaim the sparse extents, or you can force it:
# The official way to compact Docker.raw
# Requires Docker Desktop to be running (uses its internal VM)
docker run --privileged --pid=host docker/desktop-reclaim-spaceColima / Lima
If you use Colima (a Docker Desktop alternative that wraps Lima, a Linux VM manager for macOS):
# Lima VM disk images
~/.lima/<vm-name>/diffdisk # the writable overlay disk
# Colima (which wraps Lima)
~/.colima/<profile>/
# Check sizes
du -sh ~/.lima/
du -sh ~/.colima/ 2>/dev/nullSame sparse file caveat applies — du is the right tool, not ls.
Nix
The Nix store on macOS (installed via the Determinate Systems installer or the official installer) lives at /nix/store/ on a dedicated APFS volume named “Nix Store”. This is critically important for disk accounting:
/nix/store/is on a separate APFS volume, not the Data volumedu -shx /System/Volumes/Datawill not count it — it’s on a different volume- DaisyDisk will not scan it unless it explicitly mounts the volume
- It will appear as “hidden” or “other volumes” in most disk scanners
# Check if a Nix volume exists
diskutil apfs list | grep -i nix
# Check its size
df -h /nix
du -sh /nix/store/
# Collect garbage (remove packages not referenced by any profile/generation)
nix-collect-garbage -d
# The -d flag removes old profile generations first, then GCs
# Without -d, it only GCs unreferenced store paths (safer)A multi-year Nix installation with multiple profiles and generations easily reaches 40–100 GB.
Virtual machines (Parallels, UTM, VMware)
| Tool | Default disk image location |
|---|---|
| Parallels | ~/Parallels/<VM name>.pvm/ |
| UTM | ~/Library/Containers/com.utmapp.UTM/Data/Documents/ |
| VMware Fusion | ~/Virtual Machines/<VM name>.vmwarevm/ |
All of these are sparse files or packages of sparse files. Use du -sh not ls -lh.
See also
- Space Consumers - System — swap, logs, core dumps
- Space Consumers - Developer Tools — Xcode, simulators, iOS backups
- Diagnostic Playbook - Finding Hidden Space on macOS — the full workflow