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
- You need disk space now, for example to install a macOS update. Caches are the safest space to take back, though they grow again with use.
- One app misbehaves, showing an old version of a page or failing to load. Clearing that app’s cache, not everything, is the fix.
- A cache has grown huge. Developer tools are the usual case: Xcode, npm and Docker caches can each reach tens of gigabytes.
If your Mac is slow, clearing caches is unlikely to be the answer. Check the usual causes first.
Clear a browser’s cache
- Safari: Safari › Settings › Advanced, tick Show features for web developers, then choose Develop › Empty Caches. This keeps your history and logins.
- Chrome: Settings › Privacy and security › Delete browsing data, and tick only Cached images and files.
- Firefox: Settings › Privacy & Security › Cookies and Site Data › Clear Data, and tick only the cached content.
Clearing cookies as well signs you out of websites, so leave them unless that’s what you want.
Clear an app’s cache
- Quit the app.
- In Finder, choose Go › Go to Folder and enter
~/Library/Caches. - Find the folder named after the app or its developer (for example
com.spotify.client) and move it to the Trash. - 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 purgeFor the biggest ones, see Xcode’s DerivedData, Docker’s disk image and old node_modules folders.
What to leave alone
/System/Library/Cachesand/Library/Caches: macOS manages these. Leave them.~/Library/Application Supportand~/Library/Containers: these hold your apps’ data, not caches. Deleting from them can lose settings, offline files or messages.- “Clean all caches” buttons that don’t show you what they delete, or delete it for good instead of moving it to the Trash.
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.