Before deleting anything, find out how big your caches really are. Open Terminal and run:
du -sh ~/Library/Caches/* 2>/dev/null | sort -h | tail -20That lists your 20 largest app cache folders, biggest last. If the total is a few hundred megabytes, clearing it won't fix a full disk, and you can skip to where the space actually is. If one folder is many gigabytes, you've found what to deal with.
The rest of this guide covers how to clear each kind of cache, which ones come straight back, and which folders that look like caches you should leave alone.
What a cache is, according to Apple
Apple tells developers that the Caches folder is for "app-specific support files that your app can re-create easily", and that an app "does not require cache data to operate properly, but it can use cache data to improve performance" (Apple File System Programming Guide).
Two things follow from that:
- Deleting a well-behaved app's cache is safe: the app rebuilds it.
- The app will rebuild it: if you use the app the same way, the cache grows back. Clearing it buys space for a while, not for good.
Not every large cache lives in ~/Library/Caches. Browsers, Electron apps and developer tools keep big rebuildable folders elsewhere, often next to data you do want to keep. Both are covered below.
When clearing a cache actually helps
- A website or app is acting broken: a page loads old content, images don't update, an app crashes on launch after an update. A corrupt or stale cache is a common cause, and clearing that one app's cache is a quick, low-risk fix.
- You need space right now, briefly: for example, to install a macOS update. Apple suggests starting up in safe mode for this (Apple Support). Safe mode "clears some system caches, including font caches and the kernel cache, which are automatically created again as needed. This can temporarily make more storage space available" (Apple Support).
- One cache is wildly oversized: a folder of tens of gigabytes usually means a bug or a feature you don't use (an offline media cache, say). Clearing it, or changing the app's setting, can free space that stays free.
When it doesn't help, or hurts
- Speed: we couldn't find any source showing that clearing caches makes a Mac faster in general. The point of a cache is the opposite: the next launch, page load or thumbnail view is slower while it rebuilds.
- Re-downloads: streaming apps download songs again, package managers download packages again, browsers fetch every image again. On a metered or slow connection that costs you.
- Sign-outs: some "cache" folders hold login state. Clearing them signs you out of sites or apps.
- Space you'll lose again: if a cache regrows to the same size in a week, the space was never really free.
How to clear app caches in ~/Library/Caches
- Quit the app whose cache you want to clear. A running app keeps writing to the folder.
- In Finder, choose Go > Go to Folder (Shift-Command-G), type
~/Library/Cachesand press Return. - Switch to List view, choose View > Show View Options, turn on "Calculate all sizes", then sort by Size.
- Move the app's folder (or its contents) to the Trash. Don't trash the Caches folder itself.
- Open the app and check it works. Then empty the Trash; until you do, you get no space back (Apple Support).
Use the Trash rather than rm -rf. If an app misbehaves afterwards, you can put the folder back.
Leave the Caches folder itself in place: delete what's inside it, not the folder. Some com.apple.* folders in there belong to background services that are always running, so they can be recreated or locked while you work. If Finder says an item is in use, skip it or restart first.
How to clear browser caches
Use the browser's own controls. Browsers keep an index of what's cached, and the built-in button clears both.
- Safari: choose Safari > Settings, click Advanced, and select "Show features for web developers" (Apple Support). Then choose Develop > Empty Caches (Option-Command-E). This empties the cache without removing history or cookies. If the Develop menu doesn't appear, quit and reopen Safari and toggle the setting again (Apple Community).
- Chrome: click the More menu (three dots) > Delete browsing data, choose a time range, tick only "Cached images and files" and leave "Cookies and other site data" unticked, then Delete data (Chrome Help).
- Firefox: Settings > Privacy & Security, then in Cookies and Site Data click Clear Data. Tick only the cache option ("Temporary cached files and pages" in current versions; older versions call it "Cached Web Content") and click Clear (Firefox Help).
Chrome's other big folder
Chrome keeps its ordinary page cache under ~/Library/Caches/Google/Chrome, but your profile (history, settings, site data) lives in ~/Library/Application Support/Google/Chrome (Chromium docs). Inside the profile, websites' service workers (the scripts that make sites work offline and send notifications) keep their own storage in:
~/Library/Application Support/Google/Chrome/Default/Service Worker/CacheStorageIt can get large: one user on Reddit reported 41 GB in this folder (r/MacOS). That's a single report, not a typical figure, so check your own with du -sh on that folder.
It isn't purely cache: sites can use it for offline content, so clearing it may make some sites slower or sign you out of web apps that rely on it (Super User).
To clear it, quit Chrome fully and delete the contents of CacheStorage, not anything above it. Or remove one site's data from inside Chrome: Settings > Privacy and security > Third-party cookies > See all site data and permissions, search for the site and click Delete (Chrome Help). That also removes the site's cookies, so you'll be signed out of it.
Where the space actually is
On many Macs, especially ones used for development, the biggest rebuildable data isn't in ~/Library/Caches at all. Measure these too:
du -sh ~/Library/Developer/Xcode/DerivedData \
~/Library/Developer/Xcode/iOS\ DeviceSupport \
~/Library/Developer/CoreSimulator \
~/Library/Caches/Homebrew \
~/.npm/_cacache ~/Library/Caches/pip ~/Library/Caches/Yarn \
~/Library/Containers/com.docker.docker \
~/Library/Application\ Support/MobileSync/Backup \
2>/dev/null | sort -hFolders you don't have just won't show up. Then use each tool's own clean-up command, which knows what's safe to remove:
| What | Where | How to clear | Regrows? | Safe? |
|---|---|---|---|---|
| Xcode build data | ~/Library/Developer/Xcode/DerivedData | Quit Xcode and delete the folder's contents | Yes, on the next build of each project | Yes; it's generated at build time, so the next build of each project is a full one and re-indexes (Stack Overflow) |
| iOS DeviceSupport | ~/Library/Developer/Xcode/iOS DeviceSupport | Delete folders for iOS versions you no longer debug on | Yes; Xcode copies the support files from the device again when you connect it | Yes (Ask Different) |
| Simulator runtimes | Managed by Xcode | Xcode > Settings > Components, click the information button next to a runtime, then Delete (Apple) | Only if you download it again | Yes; Xcode shows how much space each frees |
| Simulator devices | ~/Library/Developer/CoreSimulator | xcrun simctl delete unavailable deletes devices "not supported by the current Xcode SDK" (from xcrun simctl help delete) | Only if you create new ones | Deletes permanently, including any apps and data inside those simulators |
| Homebrew downloads | ~/Library/Caches/Homebrew | brew cleanup --prune=all (Homebrew docs) | Yes, on each install or upgrade | Yes. Homebrew already removes downloads older than 120 days on its own |
| npm | ~/.npm/_cacache | npm cache clean --force (npm docs) | Yes, on next install | Yes. npm says its cache is self-healing, so only clear it for space; it never shrinks on its own |
| pip | ~/Library/Caches/pip | python3 -m pip cache purge (pip docs) | Yes | Yes |
| Yarn (classic, v1) | ~/Library/Caches/Yarn | yarn cache clean; yarn cache dir shows where it is (Yarn docs) | Yes, "the next time yarn or yarn install is run" | Yes |
| Docker | Docker Desktop's disk image | docker system prune (Docker docs) | Yes, as you pull and build | Removes stopped containers, unused networks, dangling images and build cache. -a also removes all unused images. Volumes are kept unless you add --volumes, which prunes unused anonymous volumes |
| iPhone/iPad backups | ~/Library/Application Support/MobileSync/Backup (Apple) | In Finder, connect the device by USB, select it, and on the General tab click Manage Backups; right-click a backup and choose Delete (Apple) | Yes, on next backup | Not a cache. Delete only backups you're sure you don't need |
| Chrome service workers | see above | see above | Yes | Mostly; may sign you out of some web apps |
| Apps built on Electron (many chat and code-editor apps) | By default ~/Library/Application Support/AppName, in Chromium's Cache and GPUCache subfolders | Quit the app, delete those subfolders only | Yes | Yes for those; the same folder also holds cookies and local storage, so leave the rest (Electron docs) |
Paths vary by app version and install method, and some apps store data elsewhere; check with du before deleting. Electron's documentation says apps' data folder sits under ~/Library/Application Support by default and that Chromium creates its own Cache and GPUCache subfolders there, next to "localStorage, cookies, disk cache, downloaded dictionaries, network state, DevTools files and compiled GPU shaders" (Electron docs). Only the cache folders are safe to remove.
Leave these alone
- /System: Apple says these resources "must not be modified" (Apple), and on current macOS the system volume is read-only anyway.
- /Library/Caches (no tilde): this holds caches shared by every user and by system services. Deleting it with
sudo rm -rfis permanent and gains little; to clear system caches, use safe mode instead (Apple Support). - The ~/Library/Caches folder itself: delete what's inside, not the folder.
- Keychains, Application Support and Containers in general: these hold settings, databases and documents. Only the cache folders described above are fair game. Sandboxed apps keep their caches inside their container (Apple), so delete only a folder named Caches inside a container's Data/Library, never the container.
- Anything in use: if Finder says an item is in use, quit the app or restart before trying again.
What "purgeable" space means
In Finder or Disk Utility you may see "available" space that's larger than "free" space. The difference is purgeable space: data, such as disk caches, that macOS can remove on its own when it needs room. Apple says "disk space might be both available and used at the same time" (Apple Support), and Disk Utility's help says "You can't manually remove the files that are designated purgeable, but macOS removes them as space is required" (quoted in Apple Community).
Howard Oakley, who has traced this in macOS logs, found that the figures come from a macOS service called CacheDelete, which purges registered caches (such as Quick Look thumbnails and Mail caches) first and Time Machine local snapshots last (Eclectic Light, Eclectic Light). Two practical points from his testing:
- Finder's numbers can be stale: Finder's Get Info can show purgeable and available space that's badly out of date; Disk Utility's figures are more reliable (Eclectic Light).
- Purging snapshots isn't reliable: if you need the space a Time Machine local snapshot is holding, delete the snapshot yourself in Disk Utility rather than waiting for macOS to do it (Eclectic Light).
So if most of your "used" space is purgeable caches, there's nothing to clear by hand. Snapshots are the exception worth acting on.
Doing it with an app
If you'd rather not run commands, Purge is a free, open-source Mac cleaner (source on GitHub) that scans ~/Library/Caches, sandboxed app caches and developer caches like Xcode, Homebrew, npm, Yarn and Docker Desktop, and shows sizes before you delete anything. It moves files to the Trash, so you can restore them. The exceptions are iOS simulators and Time Machine local snapshots, which can't go to the Trash and are deleted permanently. Everything it does, you can also do by hand with the steps above.
Quick answers
Is it safe to delete everything in ~/Library/Caches?
Mostly, if the apps are quit and you delete the contents rather than the folder. Expect slower first launches and possibly some sign-outs. It's rarely the best place to get space back.
Why did my caches come back?
Because apps rebuild them as you use them. That's normal and is what they're designed to do.
Will clearing cache speed up my Mac?
Usually not. It can fix a specific app or website that's misbehaving.
How do I clear the system cache?
Start up in safe mode, then restart normally (Apple Support).
- Apple silicon: shut down. Press and hold the power button until you see "Loading startup options", then release it. Select your startup disk, hold Shift and click "Continue in Safe Mode".
- Intel: turn on or restart the Mac and immediately hold Shift until the login window appears.
You may see "Safe Boot" in red at the top right of the login window. To leave safe mode, choose Apple menu > Restart.
