Reclaiming Disk Space from Docker on Mac
Software development
6 August 2025

Reclaiming Disk Space from Docker on Mac

Even after deleting containers and images, Docker can still hog your storage. Here's the command that finally worked for me.

I thought I had cleaned up everything. I deleted unused Docker containers. I removed old images. And yet—my Mac was still groaning under the weight of Docker’s leftovers, eating up precious disk space I couldn’t account for.

After digging around, I finally found the command that actually did the job:

docker system prune -a

This command removes all unused containers, networks, images, and build cache. It skips volumes by default, which is good if you don’t want to accidentally lose persistent data.

But if you really want to go all in—and reclaim every byte of unused Docker data—you can add the --volumes flag:

docker system prune -a --volumes

This will also clean up unused volumes, which can silently take up gigabytes over time. This is a powerful command. It removes everything that’s not actively in use—so double-check that you're not wiping something important. But if you're working on local dev environments or temporary experiments like I usually do, this can be a safe and effective reset.

I ran the prune with --volumes, and just like that, I freed up a huge chunk of disk space. Clean, fast, and finally quiet.