Guide · Updated October 28, 2026

How to clear cache on a Mac

How to clear app caches, browser caches and the DNS cache on a Mac, which caches are safe to delete, and when clearing them actually helps.

macOS 26 Tahoe or later · No credit card · Everything runs on your Mac

The short answer: quit your apps, then in Finder choose Go › Go to Folder, type ~/Library/Caches, and move the folders inside it to the Trash. Clear your browser's cache from its own settings, and flush the DNS cache in Terminal if sites won't load. Never delete the Caches folder itself, or caches in the system folders.

What a cache is

A cache is a copy of something an app could download or work out again, kept so it opens faster the next time: web pages and images, thumbnails, previews, music you streamed, build output. Everything in a cache can be rebuilt, which is why clearing it is safe. It is also why a cache comes back: as soon as you use the app, it starts filling it again.

A Mac has three kinds of cache worth knowing about:

CacheWhereSafe to clear?
App caches~/Library/CachesYes, for apps that aren't running
Browser cachesInside each browser's own folderYes, from the browser's settings
DNS cacheIn memory, kept by macOSYes, with one Terminal command
System caches/Library/Caches, /System/Library/CachesLeave them to macOS; a restart clears what needs clearing

When clearing the cache helps

  • An app shows old content, wrong images or keeps crashing on launch: clearing that app's cache often fixes it.
  • A website looks broken or out of date in one browser but fine in another: clear that browser's cache.
  • A site that moved, or a new network or VPN, won't load: flush the DNS cache.
  • Your disk is nearly full and one app's cache has grown to several gigabytes.

Clearing every cache every week doesn't make a Mac faster. Apps are slower right after, while they fill their caches again, and the space comes back within days.

How to clear app caches

  1. Quit the apps whose caches you want to clear. An app that is running can recreate its cache straight away, or crash when it disappears.
  2. In Finder, choose Go › Go to Folder (⇧ ⌘ G), type ~/Library/Caches and press Return.
  3. Choose View › as List, then View › Show View Options, tick Calculate all sizes and sort by Size. Folders are named after the app, such as com.spotify.client or Google.
  4. Move the folders you want to clear to the Trash. Leave the Caches folder itself where it is.
  5. Restart, then empty the Trash once you've checked your apps work.

Sandboxed apps keep their cache inside their own folder in ~/Library/Containers. Others have their own button for it, which is the safer way: Spotify has Settings › Storage › Clear cache, for example.

How to clear the browser cache

Clearing only the cache keeps you signed in to sites; clearing cookies too signs you out. Each browser lets you choose.

  • Safari: open Safari › Settings › Advanced and tick Show features for web developers. Then choose Develop › Empty Caches (⌥ ⌘ E). History › Clear History also clears the cache, but takes your history and cookies with it.
  • Chrome: press ⇧ ⌘ Delete, or open Settings › Privacy and security › Delete browsing data. Choose a time range, tick only Cached images and files, and click Delete data. Edge, Brave and other Chromium browsers work the same way.
  • Firefox: open Settings › Privacy & Security, and under Cookies and Site Data click Clear Data. Tick only the cached web content and click Clear.

To reload one page without its cached copy, press ⌥ ⌘ R in Safari or ⇧ ⌘ R in Chrome and Firefox.

How to flush the DNS cache

Your Mac remembers the address behind each site name for a while. When a site moves, or you switch networks or VPNs, that memory can point to the wrong place. Open Terminal and run:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Type your password when asked; nothing is shown as you type. There is no message when it's done. Your Mac simply looks each name up again.

Developer caches

Developer tools keep some of the biggest caches on a Mac, and each has its own command to clear them:

  • Xcode: delete ~/Library/Developer/Xcode/DerivedData; it's rebuilt on the next build.
  • Homebrew: brew cleanup removes old versions and downloads.
  • npm, pip and others: npm cache clean --force, pip cache purge, uv cache clean.
  • Docker: docker builder prune clears the build cache.

What not to delete

  • Anything in /System/Library/Caches or /private/var/folders. macOS manages them, and clears what it needs on restart.
  • The ~/Library/Caches folder itself. Delete what's inside it, not the folder.
  • Other folders in ~/Library, such as Application Support or Containers. They hold app data and settings, not caches, and can hold your own work.
  • "Clear all caches" Terminal commands with sudo rm -rf from the internet. One typo there can delete far more than caches.

Clear caches with Tidy My Mac

Tidy My Mac does each of these steps from one window, shows what it found before anything goes, and moves it to the Trash so you can put it back:

  • Junk Cleaner lists app caches, logs and developer caches from Xcode, Homebrew, npm and others, with the size of each.
  • Privacy Cleanup clears the cache, history and cookies of Safari, Chrome, Firefox and other browsers, profile by profile, and never touches saved passwords.
  • Maintenance flushes the DNS cache and clears font caches in one click.

If you're clearing caches to make room, caches are rarely the biggest thing on the disk. See how to free up disk space on a Mac for the rest.

Questions about clearing the cache

Yes, for app and browser caches: everything in them can be downloaded or rebuilt. Quit the app first, delete what's inside the Caches folder rather than the folder itself, and leave system caches to macOS.

No. Caches don't hold your documents, and passwords are kept in the keychain, not in a cache. Clearing a browser's cookies, which is a separate option, signs you out of websites.

Usually not. Caches exist to make apps faster, so apps are slower right after you clear them. It helps when one cache is damaged and makes an app misbehave, or when the disk is so full that macOS runs short of room.

Only when there's a reason: an app or website misbehaves, or a cache has grown to gigabytes on a nearly full disk. There's no benefit in clearing caches on a schedule.

Try every section free for 7 days.

Just your email, no credit card. Then $19.99 for your first year, $59.99 a year after that.

Start your free trial