
How to clear cache on a Mac, and is it safe? Clear your browser cache from the browser's own settings. Clear app caches by opening ~/Library/Caches in Finder, deleting the contents of the app folders inside, then emptying the Trash. You lose no documents, because cache rebuilds itself. Clearing cookies is a separate step, and it signs you out of websites.
This guide covers the three kinds of cache on a Mac and what each one holds. You get exact steps for Safari, Chrome and Firefox, the manual method for app caches, and the Terminal commands for system and DNS caches. It also covers which folders to leave alone, how often to clear cache, and what actually helps a slow Mac. Developers get extra notes on Xcode data, node_modules and build caches.
Junk Raccoon is a free Mac cleaner that finds caches and developer clutter, shows why each file was flagged, and lets you put a whole clean-up back with one click.

Step 1. Understand what cache is and what happens when you clear it
Cache is a set of temporary files that apps, browsers and macOS save so they can load things faster next time. Knowing which kind you are clearing tells you what you gain and what you might lose.
Browser cache vs app cache vs system cache
Your Mac keeps three main kinds of cache:
- Browser cache. Images, scripts and page files that Safari, Chrome or Firefox store so sites open faster. It often reaches a few hundred MB per browser and can grow past 1 GB.
- User or app cache. Files that your apps store in
~/Library/Caches. The~stands for your home folder. Spotify, Slack, Adobe apps and code editors all write here. This folder often holds 2 GB to 20 GB on a Mac that has been in use for a year or more. - System cache. Files that macOS itself stores in
/Library/Cachesand deeper system folders. macOS manages most of these and cleans many of them on its own.
Developers have a fourth pile that behaves like cache. Xcode build data, package manager caches and node_modules folders can each grow to tens of GB. The developer caches guide lists where each tool keeps its files.
Will I lose anything if I clear my cache?
You will not lose documents, photos or projects. Cache only holds copies of things an app can download or rebuild. The first launch after clearing may feel slower while the app rebuilds its cache.
Two things can change:
- Cookies. These are small files that keep you signed in to websites. If you clear cookies along with cache, you sign out of most sites.
- Offline data in some apps. A few apps keep downloads or sign-in data next to their cache. You may need to sign in again or re-download something.
How do I clear my cache? Pick the kind that matches your problem. A broken website needs a browser cache clear (Step 2). Low storage needs an app cache clear (Step 3). Network or website-address problems need a DNS flush (Step 4).
Clearing cache helps when you need storage back, when a page loads old or broken content, or when one app misbehaves. It will not make your Mac permanently faster. Apps refill their caches within days or weeks, because that is how they stay quick.
Clearing cache frees space and fixes stale content, but it never speeds up a Mac for good, because apps rebuild it.
Step 2. Clear browser cache on a Mac
Each browser clears its own cache from its own menu. Clear only the browser that shows the problem, unless you are freeing storage across all of them. The browser cache guide has extra detail for less common browsers.
Clear Safari cache
Safari hides its cache button in the Develop menu. Turn that menu on once:
- Open Safari and choose Safari > Settings.
- Click Advanced.
- Turn on Show features for web developers. Older Safari versions call it Show Develop menu in menu bar.
- Close Settings. Choose Develop > Empty Caches in the menu bar, or press Option-Command-E.
Empty Caches keeps your history, passwords and cookies. You stay signed in.
To remove cookies and website data as well, choose Safari > Clear History. Pick a range: the last hour, today, today and yesterday, or all history. Then click Clear History. Apple's Safari help page explains that this also removes cookies and website data. Expect to sign in to sites again.
Clear Chrome cache
- Open Chrome and choose Chrome > Delete Browsing Data, or press Shift-Command-Delete.
- Set the time range. Choose All time to clear everything.
- Tick Cached images and files.
- Untick Cookies and other site data if you want to stay signed in.
- Click Delete data.
Brave uses the same engine, so the same shortcut opens the same kind of dialog. If you want to see where Brave and Arc keep their files on disk, see the Brave cache folder and the Arc cache folder.
Clear Firefox cache
- Choose Firefox > Settings.
- Click Privacy & Security.
- Scroll to Cookies and Site Data and click Clear Data.
- Tick the cached web content box. Untick cookies and site data to stay signed in.
- Click Clear.
How do I delete cookies?
You can delete cookies without touching the cache, and you can delete them for a single site:
- Safari: Safari > Settings > Privacy > Manage Website Data. Select a site and click Remove, or click Remove All.
- Chrome: Shift-Command-Delete, tick only Cookies and other site data, then click Delete data.
- Firefox: Settings > Privacy & Security > Cookies and Site Data > Manage Data. Pick a site and remove it.
Deleting cookies for one site is the cleanest fix when only that site keeps logging you out or showing errors.
Is there a keyboard shortcut to clear cache on Mac? There is no single Mac-wide shortcut. Each browser has its own:
| Browser | Shortcut | What it opens | Signs you out? |
|---|---|---|---|
| Safari | Option-Command-E | Empties cache right away (Develop menu must be on) | No |
| Chrome | Shift-Command-Delete | Delete Browsing Data dialog | Only if you tick cookies |
| Firefox | Shift-Command-Delete | Clear Recent History dialog | Only if you tick cookies |
| Chrome, Firefox | Shift-Command-R | Reloads the current page without its cache | No |
App caches and system caches have no shortcut. You clear those in Finder or Terminal.
To fix one broken website, clear that browser's cache and keep your cookies, so you stay signed in.
Step 3. Clear app (user) cache on your Mac manually
The ~/Library/Caches folder usually holds the most cache by size. You can clear it by hand in about 10 minutes.
Step-by-step: delete files in ~/Library/Caches
- Save your work and quit your apps. Press Command-Q in each one. An app that is running can recreate files while you delete them, or crash.
- Open the folder. In Finder, choose Go > Go to Folder, or press Shift-Command-G.
- Type the path. Enter
~/Library/Cachesand press Return. - Find the big folders. Switch to List view (Command-2). Choose View > Show View Options and tick Calculate all sizes. Click the Size column to sort.
- Open one app folder at a time. Folder names usually follow the app, such as
com.spotify.client. Select the contents with Command-A and press Command-Delete to move them to the Trash. - Empty the Trash. Choose Finder > Empty Trash. Until you do this, you get no space back.
- Restart your Mac. Apps start fresh and rebuild only what they need.
You can paste this path into Go to Folder to jump straight to it:
~/Library/Caches
Back up with Time Machine first if you have never done this before. It costs nothing and covers any mistake.

What not to delete
Use this table to decide what is safe:
| Item | Safe to delete? | Why |
|---|---|---|
Contents of app folders in ~/Library/Caches |
Yes, with the app quit | The app rebuilds them |
The ~/Library/Caches folder itself |
No | macOS and apps expect it to exist |
| Caches of apps that are running | Not yet | Quit the app first |
com.apple.* and CloudKit cache folders |
Usually leave them | macOS manages them and may resync data |
| Adobe media cache during an active edit | Wait until the project is done | Previews must re-render, which takes time |
~/Library/Application Support and ~/Library/Containers |
No | These hold real app data, settings and sometimes documents |
Xcode ~/Library/Developer/Xcode/DerivedData |
Yes | Xcode rebuilds it on the next build, which takes longer once |
Is it safe to delete everything in ~/Library/Caches? It is mostly safe to delete the contents, but not the folder itself. Skip folders you do not recognise, and never clear the cache of an app that is running. Expect a slower first launch and a possible sign-in prompt in a few apps.
Developers should look beyond this folder. Gradle keeps gigabytes in ~/.gradle/caches, which the Gradle cache guide covers. Android Studio, Bun and similar tools keep their own piles, such as the Android Studio caches and the Bun cache. A node_modules folder holds a project's installed JavaScript packages. You can reinstall it, but check git status first. Deleting inside a project with uncommitted work is how files get lost.
Delete what is inside each app's cache folder, never the Caches folder itself, and quit the app first.
Step 4. Clear system cache and flush DNS cache
System caches belong to macOS. Most of the time you should let macOS handle them and use the two safe methods below.
Clear system cache safely
The /Library/Caches folder (with no ~ at the start) is shared by all users. Changes there need an administrator password. macOS cleans many of these files on its own. Do not delete anything in /System, because macOS protects that area and depends on it.
Two built-in methods clear system caches without risk:
- Restart. A normal restart clears temporary files that macOS no longer needs.
- Safe Mode. Safe Mode starts your Mac with only essential software and deletes some system caches, such as font caches.
To start in Safe Mode on Apple silicon:
- Shut down your Mac.
- Press and hold the power button until startup options appear.
- Select your startup disk.
- Hold Shift and click Continue in Safe Mode.
On an Intel Mac, restart and hold Shift right away until the login window appears. Then restart normally to leave Safe Mode.
Flush DNS cache on Mac
DNS is the system that turns a web address like apple.com into a numeric server address. Your Mac caches these lookups. A stale DNS cache can send you to an old server or show a "site can't be reached" error after a site moves.
Open Terminal (in Applications > Utilities). Run these two commands, one after the other:
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
sudo runs a command with administrator rights, so Terminal asks for your password. The screen shows no dots as you type. That is normal. Press Return when done. You get no success message, and the flush takes effect at once.
Clearing cache on a Mac Pro or MacBook
Every step in this guide works the same on a MacBook Air, MacBook Pro, iMac, Mac mini, Mac Studio and Mac Pro. The paths, menus and Terminal commands are part of macOS, not the hardware. The only difference is the Safe Mode start, which depends on whether your Mac has Apple silicon or an Intel chip. A Mac Pro with several drives keeps caches on the startup disk, so check that disk first.
System caches need only a restart, Safe Mode or a DNS flush, so you never have to delete files in system folders.
Step 5. Clear cache on a Mac with a cleaner app
Manual cleaning works, but it is slow. You open dozens of folders, guess what each one is, and can delete the wrong thing. A tool shows you everything in one place.
Using macOS Storage settings
macOS has a built-in storage view. On macOS 13 or later, choose Apple menu > System Settings > General > Storage. On macOS 12, choose Apple menu > About This Mac > Storage > Manage.
You see a bar chart of what uses your disk and a few recommendations:
- Store in iCloud moves files to iCloud and keeps recent ones on your Mac.
- Optimize Storage removes watched Apple TV films and shows.
- Empty Trash Automatically deletes items that have been in the Trash for 30 days.
- Reduce Clutter lists large files and downloads to review.
Apple's guide to freeing storage space explains each option. The built-in tool does not list app caches folder by folder, and it does not show developer clutter.
Using Junk Raccoon
Junk Raccoon is a free disk cleaner and file organizer for Mac, made by Halberd Labs. It finds caches, junk, duplicate files, old installers, leftovers of removed apps and developer clutter. That includes node_modules, Xcode data and old git worktrees.
Here is how it handles a clean-up:
- Scan. The disk map shows your biggest folders and your used, free and reclaimable space. A scan of millions of files takes about a minute.
- Review. Each file appears with the reason it was flagged, so you decide what goes.
- Approve. Every change waits for your OK.
- Hold. Picked files go first to a visible folder called Junk Raccoon Holding in your home folder. After you approve, they go to the macOS Trash.
- Undo if needed. Open Past clean-ups on the home screen to put a whole clean-up back with one click. This works as long as the Trash has not been emptied. The undo page shows how it works.
For developers, the git guard checks every file against git before it moves. Git projects with uncommitted or unpushed work are never touched. That means you can clear build leftovers without risking a branch you have not pushed yet.
Junk Raccoon requires macOS 12 or later and runs on Apple silicon and Intel Macs. There is no account and no ads, and scans stay on your Mac. A Windows version is coming soon. The features page lists everything it does. If you are weighing other tools, see the CleanMyMac alternative comparison and the Mac cleaner pricing comparison.
A good cleaner shows why each file is flagged and lets you put the whole clean-up back, so a wrong click costs nothing.
Step 6. Other ways to clean up your Mac and make it run faster
Cache is rarely the biggest use of space. Installers, duplicates and forgotten apps often take more.
How do I clean up my Mac to make it run faster?
Work through this list once. It usually frees more space than clearing cache:
- Delete old installers. Search Downloads for
.dmgand.pkgfiles. After you install an app, you rarely need its installer. Each one can take 100 MB to several GB. - Remove duplicate files. Copies of photos, videos and downloads pile up over the years. Check that you keep the right copy before deleting.
- Find large unused files. Sort Downloads and Movies by size. A disk map helps here. The disk space analyzer comparison lists your options.
- Uninstall apps you do not use. Drag them from Applications to the Trash. Their leftover files in
~/Libraryoften stay behind, so check for those too. - Trim login items. On macOS 13 or later, open System Settings > General > Login Items and remove apps you do not need at startup. Fewer login items means a faster startup.
- Keep macOS updated. Open System Settings > General > Software Update. Updates fix bugs that can slow your Mac.
- Leave free space. A common rule of thumb is to keep 10 to 15 percent of your disk free. On a 512 GB disk, that is about 50 to 75 GB. macOS needs room for temporary files and updates.
- Tidy Desktop and Downloads. Hundreds of loose files make things hard to find. Junk Raccoon's AI sorting groups loose files on the Desktop and in Downloads and puts them into folders you already have, such as Taxes 2024. It never splits or renames existing folders. It also works without AI, sorting files by type and year. An optional menu-bar helper tidies the Desktop once a day, asks first, and every tidy can be undone. See the AI organizer page for details.
How often should I clear cache on a Mac? Every few months is enough for most people. Clearing daily or weekly makes apps slower, because they rebuild the same files again. Use this table as a guide:
| Situation | What to clear | How often |
|---|---|---|
| A website loads old or broken content | That browser's cache | When it happens |
| A site keeps logging you out or erroring | That site's cookies | When it happens |
| Free space drops below 10 percent | ~/Library/Caches plus installers and duplicates |
When it happens |
| Normal use, no problems | App and browser caches | Every 3 to 6 months |
| Developer Mac with many projects | Xcode data, build caches, stale node_modules | Every 1 to 3 months |
| Websites will not resolve after a network change | DNS cache | When it happens |
What to do now
Pick the action that matches your problem:
- A website misbehaves. Clear that browser's cache and keep your cookies.
- You need storage back. Clear
~/Library/Cachesby hand, or run a free scan with Junk Raccoon and review what it flags. - Pages will not load after a network change. Flush the DNS cache with the two Terminal commands.
- After any clean-up. Empty the Trash, restart, then check free space in Storage settings.
- From now on. Repeat every few months, not daily.
Clearing cache on a Mac is safe when you delete the contents of app folders, quit apps first, and leave system folders to macOS. Browser caches clear from each browser's menu, and cookies are a separate choice that signs you out. Real space usually comes from installers, duplicates and developer clutter, not cache alone. To find all of it in one scan and keep the option to put everything back, try Junk Raccoon, the free Mac disk cleaner that never loses a file.
Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free to download, no account, no ads.
Download for Mac
