How do you clear cache on a Mac, and is it safe to delete ~/Library/Caches?

Clearing the user cache in ~/Library/Caches is generally safe because apps rebuild those files, but you should quit the app first and leave system caches to macOS.

Shiva ChandraMaker of Clean House · · 3 min read
Short answer

Clearing the cache in ~/Library/Caches is generally safe, because apps rebuild cache files when they need them. Quit the app, delete that app's cache subfolder, and leave system caches in /Library and /System to macOS. Expect slower first launches, and expect the folder to grow back.

What is a cache on a Mac?

A cache is a stored copy of something an app can get or build again: thumbnails, downloaded web pieces, compiled code, search indexes. Apps keep them to avoid repeating slow work. Deleting a cache costs you time on the next use, not your own files.

What is the difference between user caches and system caches?

TypePathWho owns itVerdict
User caches~/Library/CachesYour appsSafe to clear with the app quit
System caches/Library/Caches, /System/Library/CachesmacOSKeep
Per-user temp/private/var/foldersmacOSKeep, restart instead
Browser cachesInside ~/Library/Caches or the browser's settingsThe browserSafe to clear

The user cache folder is covered in detail on the ~/Library/Caches page. The per-user temp folder is explained in /private/var/folders.

Is it safe to delete ~/Library/Caches?

Mostly. Apple itself notes that starting in safe mode temporarily clears certain system caches, which shows macOS treats cache data as rebuildable. For user caches, deleting is low risk, with three caveats.

  • Quit the app first. An app that is open may be using its cache and can crash or rewrite it straight away.
  • Delete app subfolders, not the parent. Removing a few large folders is more careful than emptying everything.
  • Some folders aren't pure cache. A few apps keep downloaded content they can't recreate offline. If an app says it needs a re-download, that is the cost.

How do I clear user caches by hand?

  1. Quit every app you are about to clear, including menu bar apps.
  2. In Finder, choose Go > Go to Folder and enter ~/Library/Caches.
  3. Switch to list view and sort by size, using View > Show View Options > Calculate all sizes.
  4. Drag the large subfolders for apps you recognize to the Trash.
  5. Empty the Trash and restart the Mac.

In Terminal, you can see the largest cache folders with:

du -sh ~/Library/Caches/* 2>/dev/null | sort -h | tail -15
Don't run a blanket rm -rf on a cache folder. A typo can delete the wrong path with no Trash to recover from. Move items to the Trash so you can change your mind.

How do I clear browser caches?

Use the browser's own setting where you can. In Safari, turn on the Develop menu under Settings > Advanced, then choose Develop > Empty Caches. In Chrome, use Clear browsing data and tick cached images and files. The Chrome cache folder can be very large if you browse video-heavy sites. Clearing the cache does not sign you out, but clearing cookies does.

What should I quit before clearing caches?

Quit the app that owns the cache. For developer tools such as Xcode, Gradle, npm or Docker, quit the tool and any running build. Caches there can take a long time to rebuild, so read the specific guide first, for example Xcode storage or Gradle storage.

Does the cache come back?

Yes. A cache refills as you use the app, so clearing it is a one-time gain unless the app's cache is capped. If one app refills several gigabytes within days, look at its own settings for a cache limit, or consider whether you use it enough to keep. The same holds for logs, which regrow slowly in the Logs folders.

Because caches regrow, they are the first place to look when you need space quickly, but not the only place. For the full order of attack, see how to free up space on a Mac, and for the larger category they fall into, what System Data is.

How does Clean House handle caches?

Clean House lists cache folders by size and gives each a "Why?" card: which app made it, whether that app is still installed, and whether it comes back. Caches that refill get a way to cap them. The Reclaim room holds what is safe to go, items are moved to the Trash after a final re-check, and anything it moves can be put back from "Recently Cleared". It avoids touching things an app is using right now.

Questions

Is it safe to delete ~/Library/Caches?

Mostly yes. Apps rebuild cache files on demand, so deleting them costs speed, not data. Quit the app first and delete subfolders for specific apps rather than the whole folder if you are unsure.

Will clearing cache make my Mac faster?

Usually not. Caches exist to speed things up, so the first launch after clearing can be slower. Clear them to recover disk space, not to boost speed.

How do I clear the Safari cache?

In Safari, turn on the Develop menu in Settings > Advanced, then choose Develop > Empty Caches. Chrome and Firefox have a Clear browsing data option for cached images and files.

Should I delete the system cache in /Library/Caches?

Leave it alone. The system folders are managed by macOS, and removing them can break updates or force slow rebuilds. A restart clears what macOS considers safe.

Sources

  1. Apple Support: How to free up storage space on your Mac
  2. Apple Support: Clear your cache in Safari on Mac