How to clear the cache on a Mac, and when it’s safe

Caches are files apps keep so they can work faster, and apps make them again when they need them. Clear a browser’s cache from the browser itself, an app’s cache by quitting it and deleting its folder in ~/Library/Caches, and a developer tool’s cache with the tool’s own command.

Is it safe to clear the cache on a Mac?

Usually, yes. A cache is a copy an app can make again, so deleting it loses nothing you made. Three things to know first:

  • It frees space only until the cache grows back, often within days of normal use.
  • The app may be slower for a while as it rebuilds: web pages load again from the internet, previews are drawn again.
  • Browsers keep cookies beside the cache. Clear cookies too and you’re signed out of every site. Choose only the cache unless you mean to sign out.

Which cache do you want to clear?

“The cache” on a Mac means several different things. Pick the one that matches your problem:

Your problem The cache to clear
A website looks broken or out of date The browser’s cache, below
One app misbehaves, or its cache is huge That app’s cache in ~/Library/Caches
Your disk is full and you build software Developer tools’ caches
A website won’t load after a network change The DNS cache
You want space back in general Look first at Downloads, big videos and duplicates; caches come back

Clear Safari’s cache

  1. In Safari, choose Safari ▸ Settings, then click Advanced.
  2. Turn on Show features for web developers.
  3. Choose Develop ▸ Empty Caches from the menu bar, or press Option-Command-E.

That clears cached files only, and keeps your history, cookies and sign-ins. To remove one site’s data, choose Safari ▸ Settings ▸ Privacy ▸ Manage Website Data, select the site and click Remove. History ▸ Clear History removes history and every site’s data, which signs you out of sites.

Clear Chrome’s cache

  1. In Chrome, press Shift-Command-Delete, or choose Chrome ▸ Delete Browsing Data.
  2. Set Time range to All time, or to the time since the problem started.
  3. Tick Cached images and files only, and untick Cookies and other site data unless you want to sign out everywhere.
  4. Click Delete data.

Microsoft Edge, Brave, Arc and other browsers built on Chromium work the same way, with the same shortcut.

Clear Firefox’s cache

  1. Choose Firefox ▸ Settings, then Privacy & Security.
  2. Under Cookies and Site Data, click Clear Data….
  3. Tick Temporary cached files and pages only, and click Clear.

Clear an app’s cache

  1. Quit the app.
  2. In Finder, choose Go ▸ Go to Folder (Shift-Command-G), type ~/Library/Caches and press Return.
  3. Find the folder named after the app or its maker, often written like com.maker.appname, and move it to the Trash.
  4. Open the app again. It makes a new cache as it needs one.

Delete the app’s own folder, never the whole Caches folder. To see which caches are biggest first, run this in Terminal; it changes nothing:

du -sh ~/Library/Caches/* 2>/dev/null | sort -h | tail -15

Some apps keep their cache elsewhere and offer to clear it themselves. Spotify, Slack, Microsoft Teams, Discord and other apps built on web technology often keep a large cache in ~/Library/Application Support/[App]/Cache; look in the app’s settings for Clear cache or Storage before deleting anything by hand. Apps from the App Store keep theirs inside ~/Library/Containers.

Clear a developer tool’s cache

Developer tools keep the largest caches on many Macs. Use each tool’s own command where it has one:

Tool Command or place
Homebrew brew cleanup
npm npm cache clean --force
Yarn yarn cache clean
pip pip cache purge
Xcode ~/Library/Developer/Xcode/DerivedData; quit Xcode first. xcrun simctl delete unavailable removes old simulators
Gradle ~/.gradle/caches, with no Gradle build running
Docker docker system prune, which asks before it deletes unused images and containers

Each is made again by the next build or install, which takes longer the first time.

Clear the DNS cache

If websites fail to load after you change networks, or a site has moved, flush the Mac’s DNS cache. In Terminal:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Enter your password when asked. It prints nothing and takes effect at once.

What not to clear

  • System caches. The caches in /Library/Caches and /System belong to macOS, which clears what’s safe by itself. Apple says safe mode “clears certain system caches, which are automatically created again as needed”, so starting up in safe mode once is the safe way to clear them.
  • Anything you can’t name. If a folder in ~/Library/Caches isn’t clearly an app’s, leave it.
  • Folders in Application Support that aren’t a cache. That’s where apps keep your data, such as libraries and settings.
  • One-click “cleaners” that empty everything. You get the space back for a day and every app rebuilds at once.

Does clearing the cache speed up a Mac?

Rarely. A cache exists to make apps faster, so clearing it usually makes them slower for a while. It helps when one app’s cache is damaged and the app misbehaves, or when the disk is so full that the Mac slows down. To see what’s busy, open Activity Monitor or Brello’s Health

How often should I clear the cache?

Only when there’s a reason: a site or an app misbehaving, or a disk that’s full. Clearing on a schedule gains nothing, because the caches come back.

Will clearing the cache delete my passwords or history?

Not if you clear only the cache. Passwords are in the Passwords app and your keychain, and history and cookies are separate choices in every browser. Clear cookies and you’ll need to sign in to sites again.

Doing this with Brello

Brello PI is a Mac app we make. Its Storage page measures every kind of file on your Mac, including caches and build data that apps make again when they need them, and marks them as safe to go, each with its size. Storage works on any Mac with macOS 14 or later. Ask Brello PI to “free up space” or “clean my mac” and it also clears the caches apps make again, developer tools’ caches, and crash reports and app logs older than 30 days, after one question that lists each with its size; those are deleted for good, since apps rebuild them, and macOS’s own caches are left to macOS. Brello PI never clears a cache while its app is using it.

Checked on macOS 27.0.1, November 2, 2026. Menu names can change with a macOS update.

Sources: Free up storage space on Mac (Apple); Clear your browsing history in Safari on Mac (Apple Support).

In Brello’s help: Storage.