Skip to content

How to clear cache on a Mac: every cache, explained

How to clear cache on a Mac: Safari, Chrome and Firefox, app and developer caches, and macOS's own, each with its owner's controls and what it costs.

System Data and macOS · Published · 20 min read
A collection of assorted spices in glass jars on a rustic wooden shelf for culinary use.
Photo: monicore on Pexels

To clear cache on a Mac, clear each cache where it belongs. Browsers have their own controls, a few apps have a button in their settings, most other apps keep their caches in your Library folder where Finder can remove them, and macOS looks after its own. There's no single switch that does all of it safely.

The good news is that caches are the safest thing on a Mac to remove. A cache is a copy of something an app can fetch or work out again, so clearing it costs time, not data. The app rebuilds what it needs, a little more slowly at first.

What clearing cache doesn't do is make a Mac faster. It frees space, and it can fix a web page or an app that's stuck on stale data. The space comes back as you use your apps, so it's worth doing when a cache has grown large or belongs to an app you no longer use.

This post goes through every kind of cache on a Mac: browsers, apps, update downloads, developer tools and macOS itself. For each one, it says where it lives, how to clear it with the owner's own controls, and what it costs.

What a cache is, and what clearing it does

An app keeps a cache so it doesn't repeat work: images and scripts from websites, album artwork, thumbnails, compiled code, downloaded packages. Apple's guidelines for developers say the Caches folder is for data an app can recreate. Most apps follow that rule, and the few that don't are covered below.

What's the difference between cache, cookies and history?

Browsers keep several kinds of data side by side, and their settings offer to clear them together. Only one of them is a cache, and it's usually the only one you want to clear.

WhatWhat it holdsWhat clearing it costs
CacheCopies of pages, images and scriptsSites load more slowly the first time
CookiesSign-ins and site settingsYou're signed out of websites
Website dataDatabases and offline files for web appsWeb apps forget settings and download data again
HistoryThe pages you visitedAddress bar suggestions go, on synced devices too
Passwords and autofillSaved logins, addresses and cardsYou type them again, or lose them

Cookies and passwords take almost no space. Clearing them to free space signs you out of everything and saves next to nothing. When one site misbehaves, you can clear its cookies alone and stay signed in everywhere else.

Does clearing cache speed up a Mac?

No. Caches exist to make things faster, so removing them makes the apps involved a little slower until they rebuild. A nearly full disk can stop large downloads, exports and updates, but the fix for that is freeing space, and caches are only one place to find it.

Clearing a cache is the right fix in two other cases: a website that shows an old version of a page, and an app whose support team asks you to reset its cache. Both are about correctness, not speed.

When is clearing cache worth it?

  • A cache of an app you've deleted. Its folder stays in your Library folder for years, and nothing will ever use it again.
  • One cache that has grown far beyond the rest, such as a browser's after months of video sites, or an editing app's media cache after a big project.
  • Before something that needs room, such as a macOS update that won't fit, when every few gigabytes count.
  • A page or app stuck on stale data, for the browser or app in question only.

Every cache on a Mac, and where to clear it

Caches live in a handful of places. Here they are in one table, with the route each one's owner offers. The sections below go through each in detail.

CacheWhere it livesHow to clear itLevel
Safari~/Library/Caches/com.apple.SafariSafari's Develop menu, Empty CachesSafe
Chrome, Edge, Brave~/Library/Caches/Google/Chrome and similarThe browser's browsing data settingsSafe
Firefox~/Library/Caches/FirefoxFirefox's Privacy & Security settingsSafe
Most apps~/Library/CachesQuit the app, move its folder to the TrashSafe
Spotify~/Library/Caches/com.spotify.clientSpotify's Storage settings, Clear cacheUsually safe
Xcode build files~/Library/Developer/Xcode/DerivedDataQuit Xcode, move it to the TrashSafe
Shared caches/Library/CachesAn administrator, in FinderUsually safe
Per-user caches/private/var/foldersLeave them to macOSManaged by macOS

Safe means the owner recreates the item by itself and nothing is lost. Usually safe means it comes back at a cost: a download, offline files to fetch again, or an administrator's password. Managed by macOS means you leave it to macOS.

All of these count toward System Data in Storage settings.

How to clear cache on a Mac in Safari

Safari keeps its cache in two places in your Library folder, plus the website data sites store through it. Its own menus can clear each part, and its settings keep them apart, so you can clear the cache without signing out of anything.

How do you clear only Safari's cache?

Safari's Empty Caches command is in its Develop menu, which is hidden until you turn it on:

  1. In Safari, choose Safari › Settings and click Advanced.
  2. Select Show features for web developers. A Develop menu appears in the menu bar.
  3. Choose Develop › Empty Caches.

Apple's developer documentation describes Empty Caches as deleting all caches stored by the browser. Your history, bookmarks, passwords and cookies aren't part of the cache, so you stay signed in to websites. You can turn the setting off again afterwards; the menu disappears, but nothing else changes.

How do you remove website data in Safari?

Websites can store much more than a cache through Safari: local storage, databases and files that web apps use to work offline. Safari keeps it for each site until the site or you remove it.

To see it, choose Safari › Settings, click Privacy, then click Manage Website Data. Select the websites you no longer use and click Remove, or click Remove All.

Apple notes that this may sign you out of websites and change how they behave, and that removing it in Safari may change or remove it in other apps. Remove sites you no longer visit, rather than everything.

macOS also removes some of Safari's website data by itself when storage space is needed. That's one reason this data rarely needs clearing to free space.

Does Clear History clear the cache?

Clear History is for your browsing history, and it removes more than the list of pages. Apple says it also removes recent searches, frequently visited sites, webpage icons and snapshots, the list of downloads and the websites that asked to use your location or send notifications.

If Safari uses iCloud, history is removed from your other devices too. It isn't the tool for freeing space or fixing a stale page: Empty Caches is.

Two young adults enjoy a quiet moment in a coffee shop with warm natural lighting.
A browser's cache is a local copy of the web you've visited, and the browser fetches it again when it's gone. Photo: Robert So on Pexels

Chrome, Firefox and other browsers

Chrome, Firefox and the other browsers below keep their caches separately from your profile: the cache in ~/Library/Caches, and bookmarks, passwords and history in ~/Library/Application Support. Clearing the cache never touches the profile.

How do you clear the cache in Chrome?

  1. In Chrome, click More, the three dots at the top right, then Delete browsing data.
  2. Choose a time range. All time clears the whole cache.
  3. Select Cached images and files, and clear the checkboxes you don't want, such as Cookies and other site data and Browsing history.
  4. Click Delete data.

Google says Chrome remembers parts of pages so they open faster, and that clearing the cache removes them, so some sites load more slowly at first. If you're signed in to Chrome, deleting history or other data you've saved to your Google Account removes it from your other devices too.

Each Chrome profile keeps its own cache, in a folder named after the profile, such as Default or Profile 1. Chrome Beta and Chrome Canary keep their own caches next to it.

How do you clear the cache in Firefox?

  1. Choose Firefox › Settings, then click Privacy & Security.
  2. Under Cookies and Site Data, click Clear browsing data.
  3. Set the time range to Everything and select only Temporary cached files and pages.
  4. Click Clear.

Firefox can also clear its cache each time it closes, from the History section of the same settings. Its cache lives in ~/Library/Caches/Firefox, one folder for each profile, and your profile in Application Support isn't affected.

Edge, Brave, Arc, Vivaldi and Opera

Browsers built on Chromium work much like Chrome. Edge's route is Settings › Privacy, search, and services, then Clear browsing data: choose Cached images and files and leave cookies unchecked. The others have a similar option in their settings.

Each one keeps its cache in its own folder in ~/Library/Caches, such as Microsoft Edge, BraveSoftware or Arc. Quitting the browser and moving that folder to the Trash clears the same cache, and you stay signed in.

Why can't you change some browsers' data folders on macOS 27?

macOS 27 protects the data folders of a few apps in Application Support, so that other apps can't open or change them. Chrome's is one of them. Clear website data from inside those browsers, with the steps above.

Their caches, in ~/Library/Caches, aren't part of that data folder. Website data, cookies and history are, and that's where the browser's own settings come in.

App caches in your Library folder

Most apps keep their caches in ~/Library/Caches, in a folder named after the app or its bundle identifier, such as com.apple.Music. Sandboxed apps, including most from the App Store, keep a Caches folder inside their own container in ~/Library/Containers instead.

How do you clear app caches in Finder?

  1. Quit the app whose cache you want to clear.
  2. In Finder, choose Go › Go to Folder, enter ~/Library/Caches and press Return.
  3. Select a folder and choose File › Get Info to see its size. Start with the folders of apps you use most, or no longer use at all.
  4. Move the app's folder to the Trash. Never move the Caches folder itself.
  5. Open the app, check it works, then empty the Trash.

The post on whether it's safe to delete Library caches goes deeper into this folder: what the names mean, the folders that aren't plain caches, and what happens after you clear them.

How do you tell which app a cache folder belongs to?

Many folder names are bundle identifiers: the developer's domain written backwards, then the app's name, such as com.spotify.client. A folder that starts with com.apple belongs to an Apple app or a part of macOS, and rebuilds like any other cache. Others simply use the app's or the developer's name, such as Firefox or Google.

Folders named after an app you've deleted are the best finds. Nothing will use them again, and they take their space with them when they go.

Which app caches should you leave alone?

A few folders in Caches hold more than a cache. Spotify keeps offline downloads there, and JetBrains IDEs and Android Studio keep their local history of your edits beside their indexes. For those, use the app's own controls, described below.

Also leave the caches of apps you have open, and the parts of the Library folder that aren't caches. An app's preferences and saved window state aren't caches, and removing them only resets the app.

Apps with their own cache controls

Some apps have a button for this, and when they do, it's the better route. The app knows which of its files are cache and which are your downloads or settings.

How do you clear Spotify's cache?

Spotify stores parts of the music and podcasts you play so they play without lag, and keeps the songs and episodes you download for offline listening. On a Mac, both can end up in the same folders, and Finder can't tell them apart.

In Spotify, click your profile picture, choose Settings, scroll to Storage and click Clear cache. Your downloads stay. To remove downloads, remove them from the playlists, albums or podcasts you no longer need offline.

Slack, Teams and Discord

Slack's desktop app has a command for it: choose Help › Troubleshooting › Clear cache and restart. Slack downloads its content again, and your messages, files and settings stay in your workspace.

Microsoft recommends clearing the Teams cache only for problems with the app itself, not for missing messages, because it also deletes the logs support needs. Its steps for the new Teams remove two folders, with Teams quit: com.microsoft.teams2 in ~/Library/Containers and UBF8T346G9.com.microsoft.teams in ~/Library/Group Containers.

In Finder, moving those two folders to the Trash does the same. Your chats and files stay in Microsoft 365, but your personal app settings are reset and you might need to sign in again.

Discord keeps its caches inside its data folder in Application Support, and has no button for them. On macOS 27, macOS protects that folder, so other apps may not be allowed to remove them.

Close-up of a vintage vinyl record spinning on a turntable.
Some apps keep your offline downloads beside their cache, so their own Clear cache button is the safer route. Photo: Miguel Á. Padriñán on Pexels

Premiere Pro and Adobe's media cache

When you import video and audio, Premiere Pro, After Effects and Media Encoder create media cache files so playback is faster. They stay after a project is finished, so the folder in ~/Library/Application Support/Adobe/Common grows with every project.

In Premiere Pro, choose Premiere › Settings › Media Cache. Click Delete next to Remove Media Cache Files to delete unused cache files or all of them. The same section can delete cache files automatically once they're older than a set number of days, or when the cache passes a set size.

Music, Photos and Lightroom Classic

The Music app's cache, in ~/Library/Caches/com.apple.Music, holds album artwork and pages from Apple Music. None of it is part of your library, and Music downloads it again.

Photos is different. Its thumbnails and previews live inside the Photos library, which you should never change in Finder. Lightroom Classic keeps previews in a file next to each catalog; it rebuilds them as you browse, but only while the original photos are available.

Update downloads hiding in Caches

Apps that update themselves often download the next version into their cache folder and install it when you quit or restart the app. An update that's waiting to be installed can take several hundred megabytes.

UpdaterWhere it keeps downloadsUsed by
Sparkle~/Library/Caches, in the app's folderMany apps from outside the App Store
Squirrel (ShipIt)~/Library/Caches, in folders ending in .ShipItMany Electron apps
electron-updater~/Library/Caches, in folders ending in -updaterApps built with electron-builder
Google Updater~/Library/Application Support/Google/GoogleUpdaterChrome and other Google apps

All of these are Safe. If an update was waiting to be installed, the app downloads it again the next time it checks. Sparkle also removes its own downloads after 10 days.

Developer caches

On a developer's Mac, the largest caches usually belong to tools: build output, downloaded packages and indexes. Most of them rebuild by themselves, and several tools have their own command to clear them, often without an interface in an app.

Xcode's DerivedData and caches

DerivedData holds the build products, index and logs for every project you've opened, in ~/Library/Developer/Xcode/DerivedData. To find it, choose Xcode › Settings, click Locations, and click the arrow next to the Derived Data path. Quit Xcode, then move the folders you don't need to the Trash.

Xcode also keeps network caches in ~/Library/Caches/com.apple.dt.Xcode. Both are Safe: the next build is a full, slower one, and Xcode indexes the project again.

Package managers: npm, pip, uv, Homebrew and others

Package managers keep a copy of every package they download, so the next install is quicker. npm never removes anything from its cache by itself, so it grows with every project. pip, Yarn 1, Swift Package Manager and Homebrew keep plain cache folders in ~/Library/Caches.

Those plain folders can go to the Trash in Finder: the tool downloads what it needs again. Homebrew's own cleanup already removes outdated downloads and any older than 120 days.

npm, uv, pnpm, Go and CocoaPods have their own cleanup commands instead, and none of them has an app with a button for it. The tool's own command knows which of its files are safe to remove: pnpm's, for example, removes only packages no project uses any more.

JetBrains IDEs, Android Studio and VS Code

JetBrains IDEs and Android Studio keep a folder in Caches for each version you've used, with indexes, caches and Local History, the IDE's own record of your recent edits. Use Help › Delete Leftover IDE Directories to remove old versions' folders, and File › Invalidate Caches for the current one.

VS Code keeps its caches and logs beside your settings, in ~/Library/Application Support/Code, and trims many of them by itself. Its web, code and graphics caches, downloaded extension packages and old session logs are Safe to remove with VS Code quit; your settings and extensions live in other folders.

Typical sizes of caches that grow
  • App caches in Library2–30 GB · Safe
  • Shared caches1–10 GB · Usually safe
  • Adobe media cache5–100 GB · Safe
  • Xcode DerivedData5–100 GB · Safe
  • Xcode caches and previews1–20 GB · Safe
  • Swift and CocoaPods caches1–15 GB · Safe
  • Electron app update files0.2–3 GB · Safe

Typical ranges on Macs that have these items at all, from the research behind the app's catalog. Many Macs have far less.

System caches: what macOS clears by itself

macOS keeps caches of its own, and a few shared ones for every account on the Mac. Most of them are best left to macOS, which clears them when it needs to.

When does macOS clear caches on its own?

Apple says that when storage space is needed, macOS clears caches and logs that are safe to delete, such as temporary database files, interrupted downloads, staged macOS and app updates, and Safari's website data. You don't have to do anything for that.

It also removes temporary items that haven't been used for three days, in the private folders it keeps for each account. Those folders, in /private/var/folders, also hold a cache folder that isn't cleared on a schedule. Leave both to macOS: apps use them while they run.

Can you clear /Library/Caches?

/Library/Caches, in the Library folder at the top of your disk, holds caches that apps, helper tools and macOS services keep for every user. They're regenerable, but most belong to macOS or an administrator, so moving them to the Trash asks for an administrator's password.

It's Usually safe rather than Safe for that reason, and because a service using its cache may only rebuild it after a restart. Never touch /System/Library/Caches: it belongs to macOS, and only macOS should change it.

Does safe mode clear caches?

Yes, some. Apple says starting up in safe mode clears some system caches, including font and kernel caches, which macOS creates again as needed. It frees a little space for a while, until macOS builds them again.

On a Mac with Apple silicon, shut down, then press and hold the power button until you see Loading startup options. Select your startup disk, hold Shift and click Continue in Safe Mode. On an Intel-based Mac, press and hold Shift as it starts up, and let go at the login window. Restart normally to leave.

What about the DNS cache and "purging" memory?

Guides on clearing cache often include flushing the DNS cache or purging memory. Neither frees any storage. The DNS cache is a short list of website names and their network addresses, held in memory, and purging memory empties the copies of files macOS keeps in RAM.

Both fill up again on their own, and a restart resets both, without a Terminal window.

What happens after you clear a cache

Clearing a cache has a short tail. Knowing what to expect keeps you from clearing the same thing twice, or worrying that something broke.

Why didn't your free space go up?

First, the Trash. Folders you move there still take their space until you empty it, and Finder can put them back until then. Empty it from the Dock, or choose Finder › Empty Trash, once you're sure.

Second, Time Machine's local snapshots. If Time Machine backs up automatically, a snapshot taken in the last day may still hold the files you removed. Apple says your Mac counts that space as available, and Time Machine removes snapshots as they age or when space is needed, so it comes back by itself.

Third, the count itself. Storage settings works its figures out in the background, so give it a minute or two before you read the new numbers.

The first launch afterwards

Each app rebuilds what it needs the first time you use it. Websites load more slowly on your first visit, the Music app downloads artwork again, Xcode does a full build and indexes your project, and an IDE indexes your projects again.

None of this needs you to do anything. If an app behaves oddly afterwards, which is rare, put its folder back from the Trash and open it again.

Over the following weeks

Caches grow back to the size the app needs for what you do with it. A browser you use all day refills its cache quickly; the cache of an app you open once a month stays small.

That's why clearing the same cache again and again isn't worth it. The lasting gains come from caches of apps you've removed, and from settings that cap a cache, such as Premiere Pro's automatic deletion of old media cache files.

Other accounts on the same Mac

Every user account has its own Library folder and its own caches. Clearing yours doesn't touch anyone else's, and you can't see theirs from your account. Storage settings counts other accounts' files under Other Users & Shared.

Mistakes to avoid when you clear cache

Most of the harm done in the name of clearing cache comes from clearing too much at once, or the wrong kind of data. These are the common ones.

Don'tWhyInstead
Move the Caches folder itself to the TrashApps expect it to existRemove the folders inside it
Clear cookies to free spaceYou're signed out everywhere, for little spaceClear only the cache
Remove the cache of an app that's openThe app may write to it as you remove itQuit the app first
Clear Spotify's folders in FinderOffline downloads are mixed inUse Spotify's Clear cache
Delete inside /private/var/foldersApps use it while they runRestart; leave it to macOS
Clear preferences with the cachesThey're settings, not cachesLeave the Preferences folder alone
Paste a cache command from a web pageCommands can't be undone, and some are malwareUse Finder and the apps' settings

Should you clear caches on a schedule?

No. Caches come back as soon as you use the app, so clearing them every week buys back the same space over and over, and makes apps slower each time. Look at them when space runs short, or when an app has been removed.

Why move caches to the Trash instead of deleting them?

The Trash gives you a way back. If an app misbehaves after you clear its cache, which is rare, you can put the folder back, open the app and look again. Empty the Trash once you're sure: the space doesn't come back until you do.

A worked example

Say Storage settings shows System Data has grown, and you'd like 15 GB back before an update. Check the larger folders in ~/Library/Caches with Get Info. A 6 GB folder for a video app you deleted last year can go. Chrome's folder is 3 GB: clear it from Chrome instead.

Then check DerivedData if you use Xcode, and Premiere's media cache if you edit video. Empty the Trash, restart, and check Storage settings again once it has finished counting.

How the app does it

Wombit is a native Mac app that shows what's using your storage, explains every item in plain language, and clears it safely: Trash first, undoable and logged. File names and paths never leave your Mac.

Select a cache folder on the map, and the app says what it is, how safe it is to remove and what removing it costs, from a catalog written and checked by hand with sources. Caches the catalog knows include:

  • ~/Library/Caches/*

    App caches

    Data that apps and macOS services keep so they can load things faster. Apps create it again when they need it.

    Safe · Moves it to the Trash

  • ~/Library/Containers/*/Data/Library/Caches

    Sandboxed app caches

    Cached data that sandboxed apps, such as most apps from the App Store, keep inside their own containers.

    Safe · Moves it to the Trash

  • ~/Library/Caches/com.apple.Safari

    Safari cache

    Copies of web pages, images and scripts, and previews of your tabs, that Safari saves so pages load faster.

    Safe · Moves it to the Trash

  • ~/Library/Caches/Google/{Chrome,Chrome Beta,Chrome Canary}

    Google Chrome cache

    Web pages, images and scripts that Chrome saved so websites load faster, with a folder for each Chrome profile.

    Safe · Moves it to the Trash

  • ~/Library/Caches/Firefox

    Firefox cache

    Web pages, images and other files that Firefox saved so websites load faster, with a folder for each profile.

    Safe · Moves it to the Trash

  • ~/Library/Caches/com.spotify.client

    Spotify cache and downloads

    Music and podcasts that Spotify saved on this Mac, both for smooth playback and as downloads to play offline.

    Usually safe · Explained only: the app shows you how

  • ~/Library/Developer/Xcode/DerivedData

    Xcode DerivedData

    Build products, indexes and logs Xcode keeps for every project you've built.

    Safe · Moves it to the Trash

  • /Library/Caches/*

    Shared app and system caches

    Caches that apps and macOS services keep for every user of this Mac, in the Library folder at the top of your disk.

    Usually safe · Moves it to the Trash

Safe caches start checked in Cleanup, and only they count in the headline number. Usually safe items, such as Spotify's folders and the shared caches, wait for you to choose them.

Items whose app is open are left out, and the review sheet offers to quit the app the way ⌘Q does; a cleanup never force-quits an app. Everything goes to the Trash, with Undo and Put Back.

Tools with their own cleanup command run that command instead of having their files deleted, after the review sheet. What a command removes can't be put back, and the sheet says so.

What the app runs, after you review itPRO

npm cache clean --force
npm's download cache
uv cache clean
uv's packages, wheels and tool environments
go clean -cache
Go's build cache

Finding and explaining every cache is part of the free analyzer. Cleanup, and items that need an administrator such as /Library/Caches, are PRO: one payment of $4.99 with lifetime access. Every Pro tool's review is free to open, so you see what would go and why before you buy.

Frequently asked questions

Is it safe to clear cache on a Mac?

Yes, for the caches apps keep in your own Library folder and for browser caches. Apps recreate them, so you lose time, not data. Quit each app first, use the browser's own settings for browser caches, and leave macOS's own caches in /private/var/folders and /System alone.

Will clearing cache delete my passwords or bookmarks?

No. Passwords, bookmarks, history and cookies are stored separately from the cache, so clearing only the cache keeps you signed in. They're removed only if you select them too, for example by checking cookies or passwords in a browser's delete browsing data dialog.

How often should I clear cache on my Mac?

Only when there's a reason: a deleted app's cache, one cache that has grown very large, a page stuck on an old version, or a need for space before a big update. Caches come straight back as you use your apps, so clearing them on a schedule mostly makes apps slower.

How much space does clearing cache free?

It depends on the apps you use. On many Macs the caches in the Library folder take a few gigabytes; video editing apps, Xcode and browsers after heavy use can hold far more. Moving caches to the Trash frees nothing until you empty the Trash.

How do I clear the system cache on a Mac?

macOS clears its own caches when storage space is needed, and starting up in safe mode clears some system caches, including font and kernel caches. The shared caches in /Library/Caches can be moved to the Trash with an administrator's password. Leave /private/var/folders and /System/Library/Caches to macOS.

Why did my cache come back right after I cleared it?

Because the app is using it. Apps rebuild their caches as soon as you open them, which is how caches are meant to work. Clearing them frees space for a while; only the caches of apps you've removed stay gone.

Can I clear cache on a Mac without using Terminal?

Yes. Browsers clear their caches from their own settings, apps such as Spotify and Slack have a button for it, and Finder can move app cache folders in ~/Library/Caches to the Trash. A few developer tools, such as npm and uv, only offer a command, and have no interface for it.

Sources

  1. Develop menu · Apple Developer
  2. Manage cookies and website data in Safari on Mac · Apple
  3. Optimize storage space on your Mac · Apple
  4. Start up your Mac in safe mode · Apple
  5. Delete browsing data in Chrome · Google
  6. Storage information · Spotify