How to Clear Cache on a Mac (App, Browser and DNS Cache)

How to Clear Cache on a Mac (App, Browser and DNS Cache)

"Clear your cache" is the first thing anyone suggests when a Mac misbehaves. Sometimes it's exactly the right fix: a website keeps showing an old version, an app crashes on launch, or your disk is nearly full and caches are taking 20GB. Other times it does nothing useful, and your Mac feels slower while everything rebuilds. Here's how to clear each kind of cache, and how to tell which situation you're in.

Quick answer: To clear app caches, quit your apps, open Finder, press ⇧⌘G, go to ~/Library/Caches and delete the contents of the folders you want to clear (not the folders themselves), then empty the Trash. To clear Safari's cache, turn on Settings → Advanced → Show features for web developers, then choose Develop → Empty Caches (⌥⌘E). In Chrome, press ⇧⌘Delete. To flush the DNS cache, run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder in Terminal. If you'd rather not dig through Library folders, MacCove Space lists caches by app and size and pre-selects only the ones that are safe to clear.

The different caches on a Mac

"Cache" means several different things on a Mac, and they're cleared in different ways:

CacheWhat it doesWhere it livesWhy you'd clear it
App cachesSpeeds up apps by keeping downloaded or processed data~/Library/Caches, and sometimes inside ~/Library/Application SupportFree space; fix an app that misbehaves
System cachesSpeeds up macOS itself/Library/Caches and protected system foldersRarely needed; Safe Mode clears some
Browser cacheStores images and files from websitesInside each browserA site looks broken or out of date
Cookies and site dataKeeps you signed in, stores site preferencesInside each browserPrivacy; fix sign-in problems
DNS cacheRemembers which server a web address points toIn memoryA site won't load after it moved servers, or after changing networks

When clearing cache actually helps

Be honest with yourself about why you're doing it:

  • Helps: an app crashes or shows corrupted data, a website shows an outdated page, your disk is nearly full and caches are a big part of it, or you've stopped using an app whose cache is still large.

  • Doesn't help: as a routine "speed-up." macOS already removes caches that are safe to delete when it needs the space. Deleting caches that are in use forces apps to rebuild them, so they're slower for a while. Finder, for example, has to regenerate every Quick Look thumbnail.

How to clear app caches on a Mac

  1. Quit the apps whose caches you want to clear. Deleting caches under a running app can cause errors.

  2. In Finder, choose Go → Go to Folder (or press ⇧⌘G), type ~/Library/Caches and press Return.

  3. To see what's big, switch to List view (⌘2), press ⌘J and tick Calculate all sizes, then sort by Size.

  4. Open the folders of the apps you want to clear and delete what's inside them. Leave the folders themselves, because some apps expect them to exist.

  5. Empty the Trash, then restart your Mac.

Some apps keep their real caches elsewhere. Chrome, Slack, Teams, Discord and other apps built on web technology often store them in ~/Library/Application Support/[App name]/Cache, and App Store apps keep theirs inside ~/Library/Containers.

Usually safe to clearLeave alone
Caches of apps you no longer useAnything inside /System
Browser caches (from inside the browser)Caches of apps that are open right now
Spotify, Slack, Teams and similar media or chat cachesFolders in ~/Library/Application Support that hold real data, not caches
Xcode DerivedData, if you developKeychains, Mail and Messages databases

Doing this by hand works fine once, but it's tedious to work out which of 200 folders belong to which app. MacCove Space lists app and system caches with their sizes in its Caches category, pre-selects only the ones that are safe to remove, and sends them to the Trash so you can undo the clean if something goes wrong.

How to clear the cache in Safari

Safari hides the cache button behind its developer features:

  1. Open Safari and choose Safari → Settings (⌘,).

  2. Click Advanced and tick Show features for web developers.

  3. Choose Develop → Empty Caches from the menu bar, or press ⌥⌘E.

This clears cached files without signing you out of websites.

To also clear your history, choose History → Clear History and pick a time range. This removes visited pages, recent searches and site icons. It doesn't delete files you've downloaded.

Clearing cookies in Safari

  1. Choose Safari → Settings → Privacy.

  2. Click Manage Website Data.

  3. Select specific sites and click Remove, or click Remove All.

Removing cookies signs you out of websites, so it's best to remove cookies for the site that's causing trouble rather than all of them.

How to clear the cache in Chrome and Firefox

BrowserShortcutWhere to choose what to clear
Chrome⇧⌘DeleteChoose a time range, tick Cached images and files (and Cookies and other site data if you want), then Delete data
Firefox⇧⌘DeleteChoose a time range and tick Cache (or go to Settings → Privacy & Security → Cookies and Site Data → Clear Data)
Edge⇧⌘DeleteSame as Chrome

In Chrome, if you're signed in with sync turned on, clearing browsing data also clears it on your other devices.

How to flush the DNS cache on a Mac

If a website won't load on your Mac but works on your phone, or you've just changed DNS settings or networks, flushing the DNS cache often fixes it. Open Terminal and run:


Enter your password when asked (nothing appears as you type). The command prints nothing when it succeeds. This doesn't free up any disk space; it just makes your Mac look up web addresses afresh.

## Clearing system caches with Safe Mode

You don't need to, and shouldn't try to, delete system caches by hand. If you want to reset them, start up in **Safe Mode**: Apple says that doing so clears certain system caches, which are rebuilt as needed. On an Apple silicon Mac, shut down, hold the power button until **Loading startup options** appears, select your startup disk, then hold **Shift** and click **Continue in Safe Mode**. Restart normally afterwards.

Don't expect this to free much space. It's a troubleshooting step, not a cleanup tool.

## FAQs

### Is it safe to delete cache files on a Mac?

The contents of ~/Library/Caches are designed to be disposable, so deleting them is generally safe once the relevant apps are closed. Avoid system folders, and don't delete caches while apps are running.

### How often should I clear my Mac's cache?

Only when there's a reason: a problem to fix or space you need back. Clearing caches on a schedule mostly makes your apps rebuild them.

### Will clearing the cache delete my passwords?

Clearing a browser's cache doesn't. Clearing **cookies** signs you out of websites, but saved passwords in Passwords or your browser's password manager are kept.

### Why does my cache come back after I clear it?

Because apps are working as intended. Browsers, chat apps and streaming apps cache data to load faster, and refill their caches as you use them.

### How much space do caches take on a Mac?

It varies a lot, but 5–20GB is common on a Mac used daily, and much more if you edit video, stream music offline or develop software.

## Related guides

- How to Clear System Data on a Mac
- How to Free Up Disk Space on a Mac
- Why Is My Mac Running Slow?
- [Why Managing Storage on a Mac Is So Painful](dato:item/GvPZrCqVQBingeZOvZUOdg)

## Sources

- [Apple: Clear your browsing history in Safari on Mac](https://support.apple.com/guide/safari/clear-your-browsing-history-sfri47acf5d6/mac)
- [Apple: Manage cookies and website data in Safari on Mac](https://support.apple.com/guide/safari/manage-cookies-sfri11471/mac)
- [Apple: Free up storage space on Mac](https://support.apple.com/en-us/102624)
- [Apple: Start up your Mac in safe mode](https://support.apple.com/guide/mac-help/start-up-your-mac-in-safe-mode-mh21245/mac)
- [Google: Clear cache and cookies in Chrome](https://support.google.com/chrome/answer/2392709)
- [The Eclectic Light Company: Caches and purging in macOS Tahoe](https://eclecticlight.co/2026/09/02/caches-and-purging-in-macos-tahoe/)
- [The Eclectic Light Company: Will flushing caches free up disk space?](https://eclecticlight.co/2023/09/22/will-flushing-caches-free-up-disk-space/)

← Back to all articles