Guides

Clear any tool's cache on Mac, one at a time.

Developer tools keep their own caches, in their own places, with their own commands to clear them. Each page has the real path on a Mac, the command with its flags explained, and what you'll wait for afterward.

Which cache is the big one?

Usually npm, Docker, or Xcode. On one developer Mac measured for these pages, npm's cache was 23 GB, Docker's disk image 29 GB, and Xcode's simulators and device support about 30 GB. pip, Go, and Homebrew were under a gigabyte each. To see yours, run du -sh on the paths each page lists, or du -sh ~/Library/Caches/* ~/.* 2>/dev/null | sort -h | tail for a quick look.

Every cache here is safe to clear, because every tool downloads or rebuilds what it needs. The cost is time: a slower next install or build, and a network connection to get it. For browser and app caches, start with how to clear cache on Mac. For local AI models, which are bigger still, see delete local AI models.

Questions

Is it safe to clear developer caches on Mac?

Yes. npm, pip, Yarn, Go, Cargo, Gradle, and Homebrew caches only hold downloads and build results the tool can make again. You'll wait longer on the next install or build, and need to be online for it.

Which developer cache takes the most space?

Usually npm's ~/.npm, Docker's disk image, or Xcode's simulators and device support. Project folders like node_modules and Rust target folders often add up to more than any shared cache.

Why do developer caches come back after I clear them?

Because they're doing their job. Each install or build fills the cache again. Clearing reclaims space for a while; it doesn't change how fast the cache refills.

Know before it's full.

Free. No account, no subscription.

macOS 14 or later · Apple Silicon and Intel · brew install --cask coreyhaines31/tap/diskforecast