Skip to content
MacClearings

How to clear cache on your Mac, and when it's worth it

By Updated 5 min read

Short answer: Clear a browser's cache from the browser's own settings, and an app's cache by quitting the app and moving its folder in ~/Library/Caches to the Trash. It's generally safe, but apps and browsers rebuild their caches as you use them, and macOS clears caches on its own when space runs low, so clearing them rarely frees space that lasts.

On this page
  1. What a cache is, and why clearing it rarely lasts
  2. See how big your caches are first
  3. Clear the browser cache
  4. Clear an app's cache
  5. System caches and temporary files
  6. Is it safe to clear cache on a Mac?
  7. How MacClearings handles caches

What a cache is, and why clearing it rarely lasts

A cache is a set of copies an app keeps so it doesn't have to download or build the same things again: web pages, images, thumbnails, compiled code. On a Mac, most of them live in the Caches folder inside your Library. MacClearings' field guide describes that folder like this:

~/Library/Caches

App caches

What it is
Temporary files apps keep so they don't have to download or rebuild them each time.
Does it come back?
Comes back on its own
Without it
Apps rebuild their caches as you use them, so some may be slower at first or ask you to sign in again.
From the MacClearings field guide, as it appears in the app.

Two facts shape everything else in this guide:

  • Apps refill their caches. That's what caches are for. A browser that loses its cache downloads it again as you browse.
  • macOS already clears caches when it needs the space. Apple says that when space is needed, macOS clears caches and logs that are safe to remove, such as temporary database files, interrupted downloads, staged updates and Safari website data (Apple).

So clearing caches to free space mostly buys you a few days. Good reasons to clear one are different: a website or app showing old content or behaving oddly, a cache that ballooned after a bug, or a cache left behind by an app you've removed.

See how big your caches are first

Before you clear anything, check whether it's worth it. In Finder, choose Go > Go to Folder, type ~/Library/Caches, select the folder that opens and press ⌘I. Or list each app's cache by size in Terminal:

du -hd 1 ~/Library/Caches 2>/dev/null | sort -rh | head -15

This only reads. If the total is small next to what's filling your disk, clearing caches won't change much, and what's taking up space on your Mac is a better place to start.

Run the same command a week after you clear a cache and compare. A folder that's back near its old size is one that clearing won't help for long.

When clearing a cache is the right fix

  • A website shows an old version of a page, or keeps failing to load something that works elsewhere.
  • An app misbehaves after an update, and its developer suggests resetting its cache.
  • An app you've removed left its cache behind. This is the one case where the space stays free, because nothing will rebuild it. Uninstalling apps completely covers the other files apps leave.
  • One app's cache has grown far beyond the others, which can happen after a bug or a big sync.

Clear the browser cache

Use the browser's own settings. They know which files are safe to remove while the browser is running.

Safari

The narrowest option is the Develop menu's Empty Caches, which removes the caches Safari stores. To turn on the Develop menu, choose Safari > Settings, click Advanced, and select "Show features for web developers" (Apple Developer). Then choose:

Develop, then Empty Caches

To remove everything sites have stored, use Manage Website Data instead:

Safari, then Settings, then Privacy, then Manage Website Data

Select sites and click Remove, or click Remove All. Apple notes that this may sign you out of websites or change how they behave, and that it can affect the same data in other apps (Apple).

Chrome

Click the More button (three dots) at the top right and choose Delete browsing data. Pick a time range, select "Cached images and files", and click Delete data. Leave "Cookies and other site data" unselected if you want to stay signed in to websites (Google).

Other browsers have the same option in their privacy or history settings.

Clear an app's cache

Most apps keep their cache in a folder of their own inside ~/Library/Caches. Removing that folder while the app is closed is the standard way to reset it.

  1. Quit the app

    Quit the app whose cache you want to clear, so it isn't using those files.

  2. Open your Caches folder

    In Finder, choose Go > Go to Folder, type ~/Library/Caches, and press Return.

  3. Find the app's folder

    Look for a folder named after the app or its developer, often in the form com.developer.appname. Select it and press Command-I to see its size.

  4. Move that folder to the Trash

    Drag the app's folder to the Trash. Leave the Caches folder itself where it is.

  5. Open the app again

    The app rebuilds its cache as you use it. It may be slower at first or ask you to sign in again.

  6. Empty the Trash when you're sure

    The space is freed only when you empty the Trash. Until then, you can put the folder back.

A few things to know:

  • Some apps keep caches elsewhere. Sandboxed apps keep theirs inside their own folder in ~/Library/Containers. Apps built on web technology, such as Slack, Discord and VS Code, keep folders named Cache, Code Cache and GPUCache inside their folder in ~/Library/Application Support. Only move the folders named as caches, never the app's whole folder.
  • The Trash still holds the space. A cache you've moved to the Trash uses the same space until you empty it. If the app works worse without it, you can put it back first.
  • Leave folders starting with com.apple. alone unless you're fixing a specific problem. macOS and Apple apps use them, and some are in use the whole time you're logged in.
  • Developer tools have their own commands. Homebrew, npm, Xcode and others have cache cleanups of their own, and those caches come back only when a tool needs them. See Homebrew cleanup, clearing Xcode DerivedData and the developer page.

If your Library folder is large and you want to know what each part is, library caches on a Mac goes folder by folder.

System caches and temporary files

The system's own caches and temporary files live in places such as /Library/Caches, /private/var/folders and /private/tmp. macOS manages these:

/private/var/folders

System temporary files

Made by
macOS
What it is
Temporary files and caches macOS and apps create for each user, including Quick Look thumbnails.
Does it come back?
Comes back on its own
Without it
macOS protects this folder and clears out old items on its own.
From the MacClearings field guide, as it appears in the app.

You don't need to clear them by hand, and you shouldn't use sudo rm -rf on them. That command removes files permanently, without the Trash, and can't be undone, and some of these files are in use. If you're troubleshooting, Apple's documented way to clear some system caches is to start up in safe mode, which clears font and kernel caches that macOS then recreates. For System Data as a whole, see how to clear System Data.

Is it safe to clear cache on a Mac?

In plain words:

Safe:

  • An app's own folder in ~/Library/Caches, moved to the Trash while the app is closed.
  • A browser's cache, cleared from the browser's settings.

What you'll notice afterwards:

  • Apps and websites load more slowly the first time.
  • Some apps download things again, and some ask you to sign in again.
  • If you cleared cookies as well, websites sign you out.

Not safe, or not a cache at all:

  • The Caches folder itself. Move what's inside, never the folder.
  • Application Support, Containers, Group Containers, Preferences and Keychains. These hold app data and settings, not caches.
  • Clearing everything at once with a Terminal command found in a forum post.

Clearing all caches at once rarely breaks anything for good, but it costs more than it gives: every app rebuilds at the same time, and the space fills back up as you use the Mac.

How MacClearings handles caches

MacClearings lists caches in its Suggestions section, but it treats them differently from everything else: app and browser caches come straight back, so it never checks them for you. Here are both rules, as the app has them:

Suggestions rule · Browser caches

Browser caches

Web pages, images and scripts your browsers saved so sites load faster. You stay signed in, and history, bookmarks and passwords aren't touched. Browsers download them again within days, so moving them frees space only for a while. They start unchecked.

  • ~/Library/Caches/com.apple.Safari
  • ~/Library/Containers/com.apple.Safari/Data/Library/Caches/*
  • ~/Library/Caches/Google/Chrome/*
  • ~/Library/Application Support/Google/Chrome/*/Code Cache

Listed, but you decide whether to check it.

Suggestions rule · App caches

App caches

Temporary files apps keep to work faster. Apps recreate them as you use them, so moving them frees space only for a while, and the first launch afterwards may take a moment longer. They start unchecked.

  • ~/Library/Caches/*

Listed, but you decide whether to check it.

Caches kept by macOS and Apple apps have a rule of their own, and it starts unchecked too. What MacClearings does check for you is what's safe to lose and doesn't come straight back: package manager downloads, Xcode build data, old logs and old crash reports.

MacClearings Suggestions: developer files, caches and logs grouped with their sizes and checkboxes, and 14.5 GB staged for review.
In Suggestions, Browser caches and App caches start unchecked, while developer files and logs are checked. Nothing moves until you review the list.

The reason it can say this with numbers is space that lasts. After a cleanup, MacClearings measures each place again a day, a week and a month later. History shows how much stayed free and how much came back, rule by rule, and Suggestions orders its groups by what stays free on your Mac.

Space that lasts

Example numbers
Moved to the Trash
14.5 GB
Came back in a month
1.7 GB
Stayed free
12.8 GB
Space that lasts by rule, after a month
RuleFreedCame backStayed free
Xcode DerivedData7.4 GB1.2 GB6.2 GB
Package manager caches6.3 GB300 MB6.0 GB
Editor caches600 MB200 MB400 MB
App logs200 MB0 GB200 MB
An illustration with example numbers. MacClearings measures each place it cleaned again after a day, a week and a month, and History shows your own results, rule by rule.

When you do want a cache gone, check it, choose Review & Clean Up to see every item, and click Move to Trash. History can undo the whole cleanup or put back a single folder. MacClearings never empties the Trash, so the space returns when you empty it yourself.

Questions

Is it safe to clear cache on a Mac?

Yes, for app and browser caches, done the right way: clear a browser's cache from its settings, and an app's cache by moving its folder in ~/Library/Caches to the Trash while the app is closed. Leave Application Support, Containers and Preferences alone; those aren't caches.

Is it okay to clear all caches on a Mac?

It's rarely worth it. Every app rebuilds its cache at the same time, so things are slower for a while, and browsers download their caches again within days. macOS also clears caches on its own when space runs low.

Will I lose anything if I clear the cache?

Not your files. You may be signed out of some websites or apps, pages and apps may load slower at first, and some offline content may download again. Clearing cookies along with the cache is what signs you out of websites.

How do I clear temp and cache files on a Mac?

Clear app caches from ~/Library/Caches and browser caches from each browser. Leave system temporary files in /private/var/folders and /private/tmp to macOS, which clears old items on its own. Apple notes that starting up in safe mode also clears some system caches.

Does clearing cache free up space on a Mac?

For a while. Caches grow back as you use your apps, so the space doesn't stay free. Developer caches, such as Xcode build data and package manager downloads, come back only when a tool needs them, and usually free more space that lasts.

Find out what's filling your Mac.

MacClearings explains your disk in plain words and moves only what you review to the Trash, with Undo. Paid once, every update included.

Get it at launch

$12.50 launch price for the first 25 buyers, then $25.

macOS 15+ · Apple silicon and Intel