How to Free Up Docker Disk Space on Mac
Docker quietly consumes 10–50 GB on your Mac through dangling images, stale build cache layers, stopped containers, and forgotten volumes. Here is exactly how to find and reclaim it — with and without Terminal.
Why Docker uses so much disk space
Docker Desktop on macOS stores everything inside a large virtual disk image — typically at ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw. This file can grow to 60 GB or more and almost never shrinks automatically, even when you delete containers and images inside Docker.
The four main culprits:
- Dangling images — untagged layers left behind after rebuilds (
<none>:<none>) - Build cache — BuildKit caches every intermediate layer, which accumulates rapidly across projects
- Stopped containers — containers you ran once for testing and never removed
- Unused volumes — named volumes attached to containers that no longer exist
Step 1 — Check how much Docker is using
Open Terminal and run:
docker system dfThis shows a table with images, containers, local volumes, and build cache — including reclaimable sizes. Typical output on an active development machine shows 5–30 GB reclaimable.
Step 2 — Remove dangling images
Dangling images are untagged layers left over from rebuilds. They are always safe to delete:
docker image pruneTo also remove all images not currently used by any container (including older versions of your own images):
# WARNING: removes all unused images, not just dangling ones
docker image prune -aStep 3 — Remove stopped containers
List all containers including stopped ones:
docker ps -aRemove all stopped containers:
docker container pruneStep 4 — Clear the build cache
Build cache is the biggest single source of reclaimed space. On active CI/CD setups it can exceed 20 GB:
docker builder pruneTo remove all build cache without confirmation prompt:
docker builder prune --all --forceStep 5 — Remove unused volumes
Named volumes not attached to any running container are safe to prune. First, list them:
docker volume lsdocker volume pruneStep 6 — The nuclear option: docker system prune
To do everything above in one command:
docker system prune -a --volumes⚠️ This removes ALL unused images, containers, volumes, and build cache. Running containers and their images are safe, but you will need to re-pull images the next time you run stopped projects.
The 1-click alternative: SpaceWise
SpaceWise's Docker Deep Cleaner connects to the local Docker Engine socket and categorises everything into safe vs. potentially-needed — without any Terminal commands. It shows dangling images, stopped containers, stale BuildKit layers, and unused volumes, letting you select exactly what to clean before confirming.
Unlike docker system prune -a, SpaceWise never removes base images referenced by active compose stacks or running containers, so it's safe to run on production-adjacent development machines.
Do all of this in SpaceWise — for free
SpaceWise scans and safely cleans everything covered in this guide with one click. No Terminal required.
Download for Mac FreeRelated Guides
How to Clean Xcode DerivedData on Mac
Reclaim 20–80 GB from Xcode build caches and unused simulator runtimes.
How to Delete Abandoned Ollama & Hugging Face Models
Find and purge stale local AI model weights eating your SSD.
How to Delete node_modules Safely
Free gigabytes from dormant JavaScript projects without breaking anything.