Mac storage basics · Developer tools

Why is Docker using so much disk space on my Mac?

Short answer: Docker keeps images, containers, volumes and build cache in one virtual disk. Use docker system df, then docker system prune (carefully with -a and --volumes) and docker builder prune.

Docker Desktop keeps all images, containers, volumes and build cache inside one large virtual disk file in its container folder, and that file doesn't automatically shrink when you remove things inside it.

To reclaim space:

  1. docker system df shows what's using it.
  2. docker system prune removes stopped containers, unused networks and dangling images; add -a to remove all unused images, and --volumes only if you're sure no volume data is needed.
  3. docker builder prune clears build cache.
  4. In Docker Desktop's Resources settings you can lower the disk image size limit.

Storage Studio's What's Using Space shows Docker's data as its own row, so you can see how big it really is.

Last reviewed

Also available as Markdown and JSON.