What a cache is (and why clearing it isn’t magic)
A cache is a copy of something an app can fetch or rebuild: web page images, album artwork, map tiles, thumbnails, compiled code, downloaded packages. Apps keep it so the next time is faster. That has two consequences:
- Clearing a cache is usually safe. By design, the app can recreate it.
- Clearing a cache is usually temporary. The app recreates it, often within days, and runs slower while it does.
macOS also manages caches on your behalf. Apple says that when space is needed, macOS clears caches and logs that are safe to delete, such as temporary database files, interrupted downloads and staged updates. So clearing every cache to free space is mostly doing work macOS would do anyway. Where it pays off is a single app cache that has grown far bigger than it should, or a cache that’s corrupted and making an app misbehave.
Where Mac caches live
~/Library/Cachesis your own user caches, one folder per app. This is the one you can work with./Library/Cachesholds caches shared by all users. Leave it unless you know exactly what a folder is./System/Library/Cachesbelongs to macOS and is protected. Don’t touch it.- Developer caches live in several places, such as
~/.npm,~/Library/Caches/Homebrew,~/Library/Caches/pipand~/Library/Developer/Xcode/DerivedData. - Sandboxed apps keep their caches inside
~/Library/Containers/<app>/Data/Library/Caches. Don’t delete Container folders themselves, because they also hold the app’s data.
Step by step: clear one app’s cache in Finder
- Quit the app whose cache you want to clear. Clearing a cache while the app is using it can confuse it.
- In Finder, choose Go > Go to Folder, type
~/Library/Cachesand press Return. - Switch to list view. Open View > Show View Options, turn on Calculate all sizes, then click the Size column to sort.
- Find the app’s folder. Most are named after the app’s bundle ID, like
com.spotify.clientorcom.apple.Music. - Move the folder to the Trash. Open the app again and make sure it works before you empty the Trash.
The same thing in Terminal
This shows the 15 largest folders in your user Caches folder, biggest at the bottom. It only reads sizes:
du -hd 1 ~/Library/Caches 2>/dev/null | sort -h | tail -15On macOS 15 Sequoia and later there’s a built-in trash command, which moves things to the Trash instead of deleting them. This moves one app’s cache folder to the Trash (replace the name with the folder you found):
trash ~/Library/Caches/com.example.appOn macOS 14, drag the folder to the Trash in Finder instead. Avoid rm -rf for this. It skips the Trash, so a typo has no undo.
Browser caches
Clear browser caches from inside the browser, not by deleting folders. The browser knows which files are safe to remove, and it won’t touch your passwords or bookmarks.
- Safari: open Safari Settings, go to Advanced, and turn on Show features for web developers. Then choose Develop > Empty Caches. This keeps your history and passwords.
- Chrome: open Settings, go to Privacy and security, choose Delete browsing data, and tick only Cached images and files.
- Firefox: open Settings, go to Privacy & Security, and under Cookies and Site Data choose Clear Data, leaving only the cached content option ticked.
Browser caches are usually capped, so this is more useful for fixing a site that won’t load right than for freeing lots of space.
Developer caches
Package managers and build tools are where caches really get big, often several gigabytes each. Use each tool’s own command so it cleans up properly.
This removes everything in npm’s download cache. npm downloads packages again when it needs them:
npm cache clean --forceThis removes old Homebrew downloads and outdated versions of installed packages:
brew cleanupThis empties pip’s cache of downloaded and built packages:
pip cache purgeXcode’s DerivedData and old simulators are bigger still. See freeing up space from Xcode and deleting node_modules.
What not to do
- Don’t delete the whole
~/Library/Cachesfolder. Every app has to rebuild at once, things get slow, and some apps lose state like offline downloads that they kept there. - Don’t touch
/System/Library/Cachesor/private/var/folders. macOS manages these and cleans them itself. - Don’t confuse caches with app data.
~/Library/Application Supportand~/Library/Containersare not caches. They hold settings, libraries, chat history and documents. - Don’t clear caches on a schedule. A cleaner app that wipes caches every week just makes your apps download and rebuild the same files every week.
Clearing system caches
You can’t safely clear macOS system caches by hand, and you don’t need to. If you suspect a system cache problem, Apple’s supported route is to start up in safe mode, which clears certain system caches. They’re created again as needed when you restart normally.
If caches aren’t the problem
If your user Caches folder is only a few gigabytes, clearing it won’t fix a full disk. Look at the bigger picture instead: why System Data is so big and what to delete when your storage is full cover the usual large culprits, like old backups, snapshots, videos and developer files.
Questions people ask
- Is it safe to delete ~/Library/Caches on a Mac?
- The files in your own Caches folder are designed to be rebuilt, so removing an app folder there with the app quit is generally safe. Deleting everything at once is rarely worth it, because apps rebuild their caches and run slower while they do.
- Does macOS clear caches by itself?
- Yes. Apple says that when space is needed, macOS clears caches and logs that are safe to delete, such as temporary database files, interrupted downloads and staged updates.
- How do I clear the Safari cache?
- In Safari, open Settings, go to Advanced and turn on Show features for web developers. Then choose Develop > Empty Caches, which clears cached pages without deleting your history or passwords.
- Should I use a cleaner app to clear my Mac cache?
- Only one that shows you exactly what it will remove and lets you review it first. One-click cleaners can remove caches that come straight back, or worse, data you wanted to keep.
- Will clearing cache speed up my Mac?
- Usually not. Caches exist to make things faster, so clearing them can make apps slower for a while, though clearing a corrupted cache can fix a specific app that misbehaves.