MainspringGuides › Clear cache on Mac
macOS Guide

How to safely clear caches on Mac

Updated 2026 · 5 min read

Caches store data apps have already fetched or computed so they don't have to repeat the work. Most of the time this is helpful — but caches can grow stale, bloated, or corrupted. Some quietly eat gigabytes of space. The trick is knowing which ones are safe to clear and which to leave alone.

Types of caches on macOS

There are three broad categories:

The golden rule: never blanket-delete /Library/Caches (without the tilde) — it can cause boot issues. ~/Library/Caches (with the tilde, your user cache) is generally safe to clear entirely.

Clearing user app caches

Start by finding what's taking up the most space:

# list user cache folders sorted by size, largest first
du -sh ~/Library/Caches/* | sort -rh | head -20

You'll often find one or two folders that account for most of the space — a streaming app, an IDE with build artefacts, or a forgotten app that never cleaned up after itself.

To remove a specific app's cache:

# remove Safari's user cache (Safari will rebuild it)
rm -rf ~/Library/Caches/com.apple.Safari

Quit the app first. You can remove the entire ~/Library/Caches directory for a complete reset — everything in it is regenerable. Your Mac may feel slightly slower for a few minutes as apps rebuild, but nothing breaks.

Flushing the DNS cache

macOS caches DNS lookups to avoid repeated network round trips. This is usually invisible and helpful, but it can cause problems when a site has moved to a new IP address and your Mac keeps resolving the old one — the classic "works on my phone, not on my Mac" situation.

# flush DNS cache on macOS 13 Ventura and later
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder

Enter your password when prompted. The flush takes effect immediately.

Clearing browser caches

Clear browser caches through each browser's own UI — browsers track entries in internal databases, and deleting raw files can leave orphaned records.

Safari

Empty Caches is hidden behind the Develop menu. To enable it: open Safari > Settings > Advanced and tick Show features for web developers (macOS 13+) or Show Develop menu in menu bar (macOS 12). Then use Develop > Empty Caches.

Google Chrome

  1. Press ⌘⇧Delete, or go to Settings > Privacy and security > Clear browsing data.
  2. Set the time range to All time, tick Cached images and files, and click Clear data.
While you're tuning your Mac

Mainspring turns dozens of buried macOS settings into one-click, reversible toggles — things like disabling animations, reducing transparency, and stopping apps from reopening on login. One app for 90+ hidden switches.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once

When Safe Mode helps

macOS Safe Mode clears several system caches during startup — including the dynamic linker, kernel extension, and font registry caches. Use it when something feels wrong system-wide and you can't pin it to one app.

Log in, check whether the problem is gone, then restart normally. Caches rebuild on the next boot. Safe Mode doesn't touch user app caches.

What not to touch

When in doubt, stick to ~/Library/Caches. It's reliably safe to clear and where the biggest space savings are anyway.