Caches are temporary files macOS and your apps create to speed up repeat operations. Over time they bloat, go stale, and occasionally cause weird bugs — slow Safari, stuck DNS lookups, misbehaving apps, or sudden storage warnings. Clearing them can recover gigabytes and fix a surprising range of odd behavior.
This guide walks through every meaningful cache on macOS and shows exactly how to clear each one, with both GUI steps and Terminal commands. Everything here works on macOS Sonoma, Sequoia, and newer releases.
1. What Is Cache and Why Clear It?
A cache is a store of pre-computed or pre-downloaded data an app keeps so it doesn't have to redo expensive work. Browsers cache web pages, images, and scripts. The operating system caches font rendering results, icon thumbnails, DNS lookups, and compiled kernel extensions. Apps cache almost anything that's slow to recompute.
Reasons you may want to clear cache:
- Recover disk space — individual caches often reach 1–10 GB, and the total across all apps can exceed 30 GB.
- Fix stale content — a webpage shows old data even after a server update; usually a cache problem.
- Troubleshoot app bugs — an app crashes on launch or shows corrupted UI; clearing its cache is a classic first step.
- Protect privacy — browser caches can store sensitive page content; clearing them is a quick privacy hygiene step.
Caches on macOS live in roughly three locations: user-level at ~/Library/Caches, system-level at /Library/Caches and /System/Library/Caches, and app-specific sandboxed containers under ~/Library/Containers. Only the first and the sandboxed containers are generally safe to clear manually.
2. Clear System Cache
Strictly speaking, true system caches at /System/Library/Caches are managed by macOS and should not be touched. The ones you can safely clean live at /Library/Caches — a shared, non-SIP location that any installed app may use.
Check the size first:
sudo du -sh /Library/Caches
If the folder is more than a few hundred megabytes, it's reasonable to clear it. Quit all apps, then run:
sudo rm -rf /Library/Caches/*
macOS will prompt for your admin password. Expect a brief slowdown immediately after; the system and apps rebuild only the caches they actually need. A quick reboot after this step is a good idea.
Never run rm inside /System on modern macOS — it's protected by System Integrity Protection and tampering can leave your Mac unbootable. Stick to /Library/Caches and ~/Library/Caches.
3. Clear User Cache
The user cache is where most of your reclaimable cache data lives. It's per-user, under your home folder, and completely safe to clear.
Open Finder, hit ⌘ + Shift + G, and type ~/Library/Caches. You'll see dozens of subfolders named after apps (com.apple.Safari, com.google.Chrome, com.spotify.client, etc.). You can delete the contents of individual folders if you want to clear only one app's cache, or wipe everything at once:
du -sh ~/Library/Caches
rm -rf ~/Library/Caches/*
Important: delete the contents of the folder (/*), not the folder itself. Apps expect ~/Library/Caches to exist and will error if it's missing.
For a safer, more surgical approach, delete just the biggest offenders. List the top ten largest subfolders first:
du -sh ~/Library/Caches/* 2>/dev/null | sort -h | tail -10
Then clear only the ones that are oversized relative to how often you use the app.
4. Clear Browser Cache (Safari, Chrome, Firefox)
Browsers deserve their own section because they usually hold the single largest cache on the system.
Safari
First enable the Develop menu: Safari → Settings → Advanced → Show features for web developers (older versions: "Show Develop menu in menu bar"). Then go to Develop → Empty Caches, or press ⌥ + ⌘ + E.
To wipe all website data at once (cache, cookies, local storage), use Safari → Settings → Privacy → Manage Website Data → Remove All.
Google Chrome
Open Chrome, press ⌘ + Shift + Delete, pick a time range (All time to clear everything), check Cached images and files, and click Clear data. You can also do this via Settings → Privacy and security → Clear browsing data.
Chrome's cache lives on disk at ~/Library/Caches/Google/Chrome and inside the profile folder. You can also wipe it from Terminal while Chrome is closed:
rm -rf ~/Library/Caches/Google/Chrome/*
Firefox
Open Firefox, press ⌘ + Shift + Delete, choose Everything for "Time range to clear", check Cache, and click Clear Now. You can also set Firefox to clear history and caches automatically on quit via Settings → Privacy & Security → History.
Clearing the cache logs you out of some sites because session tokens stored alongside the cache may be invalidated. Have your password manager ready before you clear everything.
5. Clear App Cache
Many apps keep their own cache separate from the shared user cache, especially sandboxed ones. These live under ~/Library/Containers/<bundle-id>/Data/Library/Caches.
To list the biggest sandboxed caches on your Mac:
find ~/Library/Containers -type d -name Caches -exec du -sh {} \; 2>/dev/null | sort -h | tail -15
Common heavy hitters include Mail, Messages, Photos, Spotify, Slack, Discord, Zoom, and anything Electron-based. To clear a specific app's cache, quit the app first, then wipe its Caches subfolder:
rm -rf ~/Library/Containers/com.tinyspeck.slackmacgap/Data/Library/Caches/*
Replace com.tinyspeck.slackmacgap with the appropriate bundle identifier (Slack is used here as an example). You can find bundle IDs by right-clicking an app in Finder → Show Package Contents → Contents → Info.plist, or by running osascript -e 'id of app "Slack"'.
6. Clear DNS Cache
DNS caching is handled by macOS at the system level. If a website recently moved servers but your Mac still can't reach it, or a changed internal domain keeps resolving to the old address, flushing DNS usually fixes it.
On modern macOS (High Sierra and newer), run both commands:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
You'll be prompted for your admin password. There's no visible confirmation when it succeeds — silence is success. Browsers will immediately see fresh DNS answers for every new lookup, though some apps may still hold older results in their own in-process cache until relaunched.
If you're troubleshooting a specific site, also clear your browser's internal DNS cache. In Chrome, visit chrome://net-internals/#dns and click Clear host cache.
7. When to Clear Cache (and When Not To)
Clearing cache has small costs — the next few launches are slower, you may get logged out of a handful of sites, and freshly compiled caches use CPU temporarily. So don't do it on a schedule for its own sake. Instead, clear cache when:
- Your Mac shows a persistent "Startup disk almost full" warning.
- Safari, Chrome, or Firefox feels sluggish or renders pages incorrectly.
- An app crashes on launch or shows corrupted UI; clearing just that app's cache is a classic fix.
- You've updated a website and want to make sure you see the new version, not a stale copy.
- You've just removed an app and want to clean up its leftover cache data (see our uninstall apps on Mac guide).
- You're preparing to sell or give away a Mac and want to reduce leftover personal browsing data.
Don't bother clearing cache if your Mac is performing well and you're not low on disk. macOS and modern browsers are already tuned to self-manage their caches reasonably well; unnecessary wiping just forces repeated redownloads.
Final Checklist
After clearing caches, restart your Mac. A reboot forces every running process to drop its in-memory caches as well, giving you a true clean slate. Then open System Settings → General → Storage and watch "System Data" shrink.
If you need to free up even more space, pair this guide with our free up space on Mac walkthrough, and when you're ready to remove apps you no longer use, follow our uninstall apps on Mac guide for a complete, residue-free cleanup.