Quick answer
To clear cache on a Mac, empty your browser cache first (Safari: Develop › Empty Caches; Chrome and Firefox: ⌘⇧Delete), then quit your apps and delete the contents of individual folders in ~/Library/Caches. Restart afterward. Never delete anything inside /System.
A website won’t load properly, an app keeps crashing, or your startup disk is nearly full, and someone told you to “clear the cache.” This guide shows you how to clear cache on Mac safely, one layer at a time: browser caches, your user caches, app-specific caches and the DNS cache, plus what you should never touch.
Work through the sections in order. Most problems are fixed by the first one.
When you should clear cache
Clearing cache isn’t routine maintenance. It’s a fix for specific problems:
- A website shows an old version, broken layout or a login loop.
- An app crashes on launch or shows stale content after an update.
- Your startup disk is nearly full and you need space quickly.
- A site won’t load on your Mac but works on your phone (often a DNS cache issue).
If none of these apply, you can leave your caches alone. They help your Mac load things faster.
What cache is (and why it’s usually safe to clear)
A cache is a stash of temporary files that apps keep so they don’t have to download or rebuild the same data twice. Safari stores copies of images and scripts from websites you visit. Music and video apps keep chunks of media. macOS itself caches fonts, thumbnails and app data.
Because caches are, by design, rebuildable, deleting them doesn’t remove your documents or settings. The trade-off: apps and websites may feel a bit slower the first time you open them afterward while the cache fills back up.
There are three kinds you’ll deal with:
| Cache type | Where it lives | Safe to clear? |
|---|---|---|
| Browser cache | Inside each browser | Yes, from the browser’s own menus |
| User cache | ~/Library/Caches (your home folder) | Yes, folder by folder, with apps quit |
| System cache | /Library/Caches and /System | Leave to macOS |
How to clear cache on Mac in Safari
Safari’s cleanest cache option lives in its Develop menu, which is hidden by default.
Turn on the Develop menu
- Open Safari.
- Choose Safari › Settings in the menu bar.
- Click the Advanced tab.
- Select Show features for web developers.
A Develop menu now appears in the menu bar. On older versions of Safari (before Safari 17), the checkbox is called Show Develop menu in menu bar.
Empty Safari’s cache
- Choose Develop › Empty Caches, or press ⌥ Option + ⌘ Command + E.
- Reload the page that was giving you trouble.
This removes cached files only. Your history, cookies, saved passwords and open tabs stay put.
Clear history and website data instead (optional)
If a site still misbehaves, the problem may be a cookie rather than the cache.
- Choose Safari › Settings › Privacy.
- Click Manage Website Data.
- Search for the site, select it and click Remove.
Warning: Clicking Remove All in Manage Website Data, or using History › Clear History, signs you out of websites. Clear History also deletes your browsing history on every device signed in to the same Apple Account with Safari syncing turned on. Apple explains the options in Clear your browsing history in Safari.
Clear the cache in Google Chrome
- Open Chrome.
- Press ⌘ + ⇧ Shift + Delete, or choose Chrome › Delete Browsing Data (older versions call it Clear Browsing Data).
- Set Time range to All time.
- Select Cached images and files.
- Deselect Cookies and other site data and Browsing history if you want to stay signed in and keep your history.
- Click Delete data.
Chrome profiles have separate caches, so repeat this in each profile you use. Other Chromium browsers (Edge, Brave, Arc, Vivaldi) use nearly identical options.
Clear the cache in Firefox
- Open Firefox.
- Choose Firefox › Settings.
- Click Privacy & Security in the sidebar.
- Scroll to Cookies and Site Data and click Clear Data.
- Select only the cache option (labeled Temporary cached files and pages in current versions, or Cached Web Content in older ones).
- Click Clear.
Firefox’s ⌘⇧Delete shortcut opens a similar dialog with a time range. Make sure you deselect cookies there too unless you want to sign out of everything.
Clear user caches in ~/Library/Caches
Your user Library holds caches for nearly every app you’ve opened. This is where the big space savings usually are, and it’s safe as long as you go folder by folder.
- Quit every app you can (⌘ + Q). If one refuses, see how to force quit on Mac.
- Click the desktop to make Finder active.
- Choose Go › Go to Folder, or press ⌘⇧G.
- Type
~/Library/Cachesand press Return. - Choose View › as List, then View › Show View Options and select Calculate all sizes so you can see which folders are largest.
- Open a large folder that clearly belongs to one app (for example,
com.spotify.clientorGoogle). - Select the files inside it and drag them to the Trash. Leave the folder itself in place.
- Restart your Mac.
- Use your apps for a day. If everything works, empty the Trash.
The ~ means your home folder, so this path is /Users/yourname/Library/Caches. It’s a different folder from /Library/Caches at the top of your disk.
Tip: Moving files to the Trash rather than deleting them outright gives you an undo. If an app breaks, drag its files back before you empty the Trash.
Some folders, especially ones starting with com.apple., may show “Operation not permitted” or reappear immediately. That’s macOS protecting them. Skip those and move on.
What not to delete
- Anything inside
/System. macOS protects this folder with System Integrity Protection, and there’s nothing in it for you to clean. - The
~/Library/Cachesfolder itself. Empty the subfolders, not the parent. /Library/Cachesand/private/var/folders. These are shared and temporary system locations that macOS manages and trims on its own. Restarting clears much of their temporary content safely.- Other folders in
~/Library.Application Support,Containers,MailandPreferenceshold real data like mail, settings and app databases, not cache.
Warning: Avoid copy-pasted Terminal commands like
rm -rf ~/Library/Caches/*. They delete instantly (no Trash), and a single typo or extra space can wipe out the wrong folder.
Clear app-specific caches
Several large apps have their own cache controls, which are safer than deleting their files manually:
- Spotify: Settings › Storage › Clear cache. Downloaded songs are stored separately.
- Slack: Help › Troubleshooting › Clear Cache and Restart.
- Xcode (developers): build products in
~/Library/Developer/Xcode/DerivedDatacan be deleted with Xcode quit. Xcode rebuilds them on the next build. - Photo, video and music apps: Final Cut Pro, Lightroom and DAWs often keep render or preview caches you can manage from their settings. Look for “cache,” “render files” or “previews” in the app’s preferences rather than deleting them in Finder.
If an app has a cache setting, use it. The app knows which files are truly disposable.
Flush the DNS cache
Your Mac caches the addresses of websites it has looked up. If a site moved servers, or you changed DNS settings, a stale entry can make the site fail to load in every browser. Flushing it is harmless.
- Open Terminal (in Applications › Utilities, or search with Spotlight).
- Paste this command and press Return:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Enter your Mac login password when asked. Nothing appears as you type, which is normal. Press Return.
There’s no confirmation message. If the prompt returns without an error, it worked. Quit and reopen your browser.
Restart to clear temporary system caches
Many system caches and temporary files are cleared or rebuilt during startup, so a plain restart (Apple menu › Restart) is the safest system-level cache clear there is.
If you need more, Apple notes that starting up in safe mode clears certain system caches, which are created again as needed. That’s mainly useful to temporarily free space for something like a macOS update. Restart normally to leave safe mode. Apple’s Free up storage space on Mac article covers this and other options.
How much space will you get back?
It varies a lot. A browser cache is often a few hundred megabytes to a few gigabytes. User caches can reach tens of gigabytes on a Mac that’s been in use for years, especially with music streaming, design or developer tools installed.
Clearing cache is a quick win, but it’s rarely the biggest one. Caches are counted in the gray System Data bar in Storage settings, and they grow back. For lasting results:
- Follow our full guide on how to free up space on Mac, which covers large files, old backups and iCloud optimization.
- If System Data looks huge, read what System Data on Mac is and how to reduce it.
- Use a disk space analyzer for Mac to see exactly which folders are taking up room.
- Remove apps you don’t use, along with their leftovers. Our guide to deleting apps on Mac shows how.
Quick checklist
- Browser acting up? Empty that browser’s cache first.
- Still broken? Clear that site’s cookies or website data.
- App acting up? Use its built-in cache option, or empty its folder in
~/Library/Cacheswith the app quit. - Site won’t load anywhere? Flush the DNS cache.
- Restart your Mac.
- Empty the Trash once everything works.
Frequently asked questions
Is it safe to clear cache on a Mac?
Yes, as long as you stick to browser caches and the folders inside your own ~/Library/Caches folder and quit apps first. Caches are rebuilt automatically. Never delete files inside /System or /Library folders you don't recognize.
Will clearing the cache delete my passwords or bookmarks?
No. Clearing only the cache removes temporary copies of web pages and app data. Passwords, bookmarks and history are stored separately. Clearing cookies or website data, however, will sign you out of websites.
How often should I clear cache on my Mac?
There's no need to do it on a schedule. Clear a browser cache when a website looks broken or out of date, and clear app caches when an app misbehaves or you need to recover disk space quickly.
Does clearing cache make a Mac faster?
Usually not by much, and things can feel slightly slower at first while apps and websites rebuild their caches. The main benefits are fixing glitches caused by stale data and freeing disk space.
Why did my cache come back after I deleted it?
That's normal. Apps and browsers recreate their caches as you use them, because cached data makes them load faster. If one app's cache keeps growing very large, check that app's settings for a cache size limit.
Is there a single command that clears all cache on a Mac?
There's no built-in one-click option, and Terminal commands that delete whole cache folders are risky because a typo can remove the wrong files. Use Finder to delete specific app cache folders instead, and restart your Mac afterward.