Guide

How to clear cache on Mac, safely.

Most people mean the browser cache, so that comes first: Safari, Chrome, and Firefox, each in under a minute. Then the caches that take real disk space: your apps, macOS itself, and developer tools.

The short version

In Safari, turn on Settings › Advanced › Show features for web developers, then choose Develop › Empty Caches. In Chrome, press Command-Shift-Delete, check Cached images and files, and click Delete data. For app caches, quit the app and move its folder in ~/Library/Caches to the Trash. Leave macOS's own caches alone.

How to clear browser cache on Mac

Your browser cache holds copies of images, scripts, and pages from sites you've visited, so they load faster next time. Clearing it fixes pages that look stale or broken, and usually reclaims a few hundred megabytes to a couple of gigabytes. It doesn't sign you out. Cookies do that, and they're a separate checkbox.

Safari

  1. Show the Develop menu. Choose Safari › Settings › Advanced and turn on Show features for web developers. Older versions of Safari call it Show Develop menu in menu bar.
  2. Empty the cache. Choose Develop › Empty Caches, or press Option-Command-E. Your history, cookies, and logins stay put.

Chrome

  1. Open Delete browsing data. Press Command-Shift-Delete, or choose Chrome › Delete Browsing Data. Older versions call it Clear Browsing Data.
  2. Pick the cache only. Set Time range to All time, check Cached images and files, and uncheck the rest unless you want those gone too.
  3. Click Delete data. Chrome keeps your logins as long as cookies stay unchecked.

Firefox

  1. Open Clear Data. Choose Firefox › Settings › Privacy & Security, scroll to Cookies and Site Data, and click Clear Data.
  2. Pick cached files. Check Temporary cached files and pages (older versions say Cached Web Content), uncheck cookies, and click Clear.

How to clear cache and cookies on Mac

Clearing cookies signs you out of most sites, so do it on purpose: a site that keeps misbehaving, a Mac you're handing to someone else, or a clean start.

  • Safari: choose Safari › Clear History, pick all history, and click Clear History. That removes history, cookies, and cached data together. To keep your history, use Safari › Settings › Privacy › Manage Website Data and click Remove All instead.
  • Chrome: in Delete browsing data, check both Cookies and other site data and Cached images and files.
  • Firefox: in Clear Data, check both Cookies and site data and Temporary cached files and pages.

How to clear app caches on Mac

Every app keeps its cache in your Library folder, and this is where the gigabytes usually are. On the Mac this guide was written on, ~/Library/Caches held 17 GB. Chrome's disk cache lives here too, in the Google folder, alongside folders like Homebrew, pip, and com.spotify.client.

  1. Quit the apps whose caches you'll clear. A running app can rewrite its cache while you work, or trip over it when it disappears.
  2. Open the Caches folder. In Finder, choose Go › Go to Folder (Command-Shift-G), type ~/Library/Caches, and press Return.
  3. Sort by size. Choose View › as List, then View › Show View Options and turn on Calculate all sizes. Click the Size column.
  4. Move the big folders to the Trash. Start with apps you recognize. Move the folders inside Caches, never the Caches folder itself.
  5. Empty the Trash a day later. Use your Mac as usual first. If an app acts up, put its folder back. Otherwise, empty the Trash and the space is yours.

A few apps keep their cache somewhere else. Microsoft Teams, for one, keeps it inside its own containers: see how to clear Teams cache on Mac.

Want to know what else is filling the disk before you start? Check your Mac's storage first; caches are often only part of the story.

Is it safe to delete cache files on Mac?

For the caches in your own Library folder, yes. A cache is, by definition, a copy an app can make again. The cost is time: the app is slower the first time it rebuilds, and a music or video app may download things again.

  • Clear the contents, not the folder. Leave ~/Library/Caches itself in place. Apps expect it to exist.
  • Skip Apple's folders. Folders that start with com.apple. belong to macOS and Apple's apps. macOS manages them and rebuilds them right away, so you gain little.
  • Don't expect it to last. Caches refill as you use your apps. Clear them when you need the room or an app misbehaves, not as a weekly chore.

System caches: leave them to macOS

macOS keeps its own caches in /Library/Caches and /System/Library/Caches. Leave both alone. The system folder is protected by System Integrity Protection, and on most Macs /Library/Caches is small anyway; on the Mac this guide was written on, it was 7 MB.

If you suspect a bad system cache, start up in safe mode, which Apple says deletes some system caches as part of its checks. On a Mac with Apple silicon, shut down, press and hold the power button until the startup options appear, select your disk, then hold Shift and click Continue in Safe Mode. Restart normally afterward, and macOS rebuilds what it needs.

Developer caches: npm, Docker, and Xcode

If you write code, this is where cache gets big. Package managers keep every version they've ever downloaded, and Xcode keeps build products for every project you've opened. On the Mac this guide was written on, npm's cache alone was 23 GB.

Each tool clears its own cache, and downloads what it needs again on the next install:

npm cache clean --force
pnpm store prune
yarn cache clean
pip cache purge
brew cleanup --prune=all

Docker keeps images and build cache inside its disk image. Its own command removes what nothing is using:

docker builder prune
docker system prune

For Xcode, quit it, then move the folders inside ~/Library/Developer/Xcode/DerivedData to the Trash; Xcode rebuilds them on the next build. Folders in ~/Library/Developer/Xcode/iOS DeviceSupport come back when you plug that device in again. Simulator runtimes are bigger still, and they count toward System Data; the System Data guide covers removing them with xcrun simctl.

Every tool has its own page with the real path on a Mac, its flags, and what rebuilds: npm, Yarn, pip, Homebrew, Docker, Xcode, and more in clear cache by tool.

Or reclaim every cache in one window.

Disk Forecast finds app caches, package manager caches, Xcode DerivedData and device support, and logs, and explains each one. They rebuild themselves, so they come checked. macOS's own caches are left alone, and everything goes to the Trash. It's free.

Questions

How do I clear cache on a MacBook Air or MacBook Pro?

The same way as on any Mac. MacBook Air, MacBook Pro, iMac, and Mac mini all run macOS, so the Safari, Chrome, Firefox, and ~/Library/Caches steps in this guide work on each one.

Is it safe to delete cache files on Mac?

For the caches in your own Library folder, yes. A cache is a copy an app can make again, so the cost is a slower first launch while it rebuilds. Quit the app first, move the folders inside ~/Library/Caches to the Trash, and keep the Caches folder itself.

Is it safe to delete all cache files on Mac?

Not all at once, and not the system ones. Your own app caches are fine to clear with the apps quit. Leave /Library/Caches and /System/Library/Caches to macOS, and never delete the Caches folder itself.

Will clearing the cache sign me out or delete my passwords?

Clearing the browser cache won't. Clearing cookies signs you out of most sites. Saved passwords live in your keychain, which the Passwords app shows on macOS 15 and later, not in any cache.

Why does the cache come back after I clear it?

Because that's its job. Apps and browsers rebuild their caches as you use them, so clearing them reclaims space for a while rather than for good. Disk Forecast shows how fast your disk is filling, so you know when it's worth doing again.

Will clearing cache fix a slow Mac?

Rarely. Clearing a browser cache can fix a site that loads wrong, and clearing an app's cache can fix an app that misbehaves. On an SSD, free space only matters to how a Mac runs when the disk is nearly full.

Know before it's full.

Free. No account, no subscription.

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