Guides

How to clear the cache on a Mac, and when not to

Clearing caches frees space but rarely makes a Mac faster, because apps rebuild them. Here's when it helps, how to do it safely, and which caches to leave alone.

Last checked 22 October 2026

A cache is a copy an app keeps so it doesn’t have to download or work something out again: web pages, thumbnails, build results, packages. Deleting a cache is safe, because the app makes it again. That’s also why clearing caches rarely makes a Mac faster: for a while after, apps are slower while they rebuild what you deleted.

When clearing the cache helps

If your Mac is slow, clearing caches is unlikely to be the answer. Check the usual causes first.

Clear a browser’s cache

Clearing cookies as well signs you out of websites, so leave them unless that’s what you want.

Clear an app’s cache

  1. Quit the app.
  2. In Finder, choose Go › Go to Folder and enter ~/Library/Caches.
  3. Find the folder named after the app or its developer (for example com.spotify.client) and move it to the Trash.
  4. Open the app again. It rebuilds what it needs.

You can clear everything in ~/Library/Caches the same way, after quitting your apps, but expect a slower day while it all comes back.

Developer caches

These grow fastest, and each tool has its own command that clears it properly:

brew cleanup          # Homebrew's old downloads and versions
npm cache clean --force
pnpm store prune
yarn cache clean
pip cache purge

For the biggest ones, see Xcode’s DerivedData, Docker’s disk image and old node_modules folders.

What to leave alone

Unslow lists each cache with its size and what clearing it costs, such as “the next build is slower once” or “downloads up to 1.9 GB again”, ticks only caches that rebuild on their own, and moves everything to the Trash.