Guide · Docker
Docker disk usage on a Mac: find it and reclaim it safely
Updated · Scott Havird
short answer
Run docker system df to see what images, containers, volumes and build cache take. docker builder prune is always safe, docker image prune removes untagged images, and docker image prune -a removes every image no container uses (they are pulled again when needed). Look at docker volume ls before deleting any volume: volumes hold databases and state.
Why Docker fills a Mac
On macOS, Docker Desktop runs containers in a Linux virtual machine, and everything that VM stores lives in a single disk image: ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw. Every image you pull, every layer of build cache and every volume adds to it. The file is sparse, so Finder and ls -l show its maximum size, while du shows what it actually uses on disk.
du -h ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
The maximum is set in Docker Desktop under Settings > Resources > Advanced. Lowering it doesn't free space by itself; removing what's inside does.
See what's inside
docker system df # totals for images, containers, local volumes, build cache
docker system df -v # per image, container and volume, with what's in use
docker volume ls
The RECLAIMABLE column of docker system df is the space not used by any container. Images used by a running or stopped container aren't reclaimable until the container is removed.
Reclaim it safely by hand
| Command | Removes | Cost |
|---|---|---|
docker builder prune | Build cache not in use | regenerable the next build is slower once |
docker image prune | Untagged (dangling) images | regenerable usually nothing |
docker container prune | Stopped containers | review their writable layer and logs |
docker image prune -a | Every image no container uses | expensive pulled or rebuilt on next use |
docker volume rm <name> | One volume | review databases and state don't come back |
- Be careful with
docker system prune -a --volumes. It combines all of the above, including volumes. It is the quickest way to lose a local database. - Check volumes by name.
docker volume ls, thendocker volume inspect <name>if you don't recognize one. Volumes from old Compose projects are usually named<project>_<service>. - Measure with
duafterwards, not Finder, sinceDocker.rawis sparse.
OrbStack keeps its containers, images, volumes and Linux machines in ~/Library/Group Containers/HUAQ24HBR6.dev.orbstack/data. When OrbStack is your Docker engine, the same docker commands above work against it.
How lysosome does it
lysosome caches --category containers # read-only report
lysosome clean --caches --only docker-build-cache # dry run: docker builder prune
lysosome clean --caches --only 'docker-*' --tier regenerable_expensive
# also images no container uses
lysosome reads docker system df -v, and only if Docker is already running; it never starts Docker. The build cache is regenerable and cleaned with docker builder prune --force. Images no container uses are regenerable_expensive and removed with docker image rm (a multi-tagged image is one item, counted once). Images a container uses, every volume, and OrbStack's data folder are labeled review and never cleaned.
The same report covers the rest of a dev machine: agent worktrees, build artifacts, local AI models and Xcode.