What clearing cache does and why you might need to
Cache is temporary data that your Mac stores to make programs and websites load faster the next time you use them. Over time, this cache can pile up and take up disk space, or occasionally cause a program to behave strangely because it's using outdated cached information instead of fetching fresh data.
Clearing cache won't hurt your Mac or any of your programs. The worst that happens is websites take a few extra seconds to load the first time after you clear, because your browser has to download fresh copies of images and files. After that, new cache builds up automatically and things speed back up.
You'll clear cache in different places depending on what's slowing down or misbehaving — your web browser, a specific program, or your entire system. The steps below cover the most common places.
Key Takeaways
- Browser cache lives inside Safari, Chrome, Firefox, or Edge and clears in seconds from each program's settings menu.
- System cache on your Mac accumulates in hidden folders and requires either a third-party tool or manual deletion through Terminal.
- Clearing cache for one program won't affect other programs, so you can target just the one that's misbehaving.
- After clearing cache, websites and programs may load slightly slower on first use while new cache rebuilds.
- If a program crashes or freezes after clearing its cache, restart the program — it will rebuild what it needs automatically.
Clear cache in Safari
Safari stores cache in its own folder. Open Safari, then click Safari in the menu bar at the top of your screen. Select Clear History from the dropdown menu.
A window will pop up asking how far back you want to clear. Choose All History from the dropdown if you want to remove everything, or pick a specific time range like "the last day" or "the last week" if you only want to clear recent cache. Check the box next to Cookies and website data — this clears cached files along with login information websites have stored. Click Clear History to finish.
Clear cache in Chrome
Open Chrome and click the three vertical dots in the top right corner. Select Settings from the menu, then click Privacy and security on the left side. Click Clear browsing data.
A window appears with checkboxes for different types of data. Make sure Cached images and files is checked. At the top, use the dropdown to choose your time range — All time clears everything, or pick a specific window. Click Clear data when you're ready.
Clear cache in Firefox
Open Firefox and click the three horizontal lines (hamburger menu) in the top right. Select Settings, then click Privacy & Security on the left. Scroll down to the Cookies and Site Data section and click Clear Data.
A small window opens. Make sure both Cookies and Site Data and Cached Web Content are checked. Click Clear to remove them. Firefox will also let you set it to clear cache automatically every time you close the browser — look for the checkbox labeled Delete cookies and site data when Firefox is closed if you want that.
Clear cache in Edge
Open Microsoft Edge and click the three dots in the top right corner. Select Settings, then click Privacy, search, and services on the left. Under Clear browsing data, click Choose what to clear.
Check the boxes for Cached images and files and any other data types you want to remove. Use the time range dropdown at the top to select how far back to clear. Click Clear now to finish.
Clear system cache on your Mac without third-party tools
Your Mac also stores system cache — temporary files created by the operating system and your programs — in hidden folders. To clear this without downloading extra software, you'll use Terminal, which is a text-based way to give your Mac direct commands.
Open Terminal by pressing Command + Space, typing terminal, and pressing Enter. Copy and paste this command exactly as it appears: rm -rf ~/Library/Caches/* and press Enter. Your Mac will ask for your password — type it in (you won't see the letters appear, which is normal) and press Enter again. This removes cached files from your user account.
If you want to clear cache for all users on the Mac, use this command instead: sudo rm -rf /Library/Caches/* Your Mac will ask for your password again. This takes a bit longer because it's clearing more files. When the command finishes and you see the prompt return, you're done.
Close Terminal and restart your Mac. When it boots back up, programs will rebuild their cache as needed.
When to use a third-party cleaning tool
If you're uncomfortable using Terminal, several Mac cleaning programs can clear cache with a single click. CleanMyMac X, AppCleaner, and Disk Diag all have free or paid versions that handle cache removal through a graphical interface — you just open the program, select what you want to clear, and click a button.
These tools are optional. Everything you can do with them you can also do through Safari, Chrome, Firefox, or Terminal. They're useful mainly if you clear cache frequently and want to avoid typing commands or hunting through menus each time. Download any tool only from the Mac App Store or the developer's official website to avoid malware.
What to do if something breaks after clearing cache
Occasionally a program will behave oddly immediately after you clear its cache — it might load slowly, show a blank screen, or ask you to log in again. This is normal and temporary. Restart the program and it will rebuild the cache it needs. If a website looks broken after clearing browser cache, do a hard refresh by pressing Command + Shift + R instead of the normal refresh button.
If clearing cache caused a persistent problem, you can undo it by restarting your Mac. Your system will begin rebuilding cache automatically as you use programs and visit websites. There's no way to restore the exact cache you deleted, but your Mac will recreate similar cache within a few hours of normal use.
Frequently Asked Questions
Will clearing cache delete my passwords or saved information?
Browser cache and cookies are different things. Cache is just images and files. If you check the "cookies" or "site data" box when clearing, you'll also remove saved passwords and login information — websites will ask you to sign in again. If you only clear cache without checking cookies, your passwords stay. Check what boxes are selected before you click clear.
How often should I clear cache?
Most people don't need to clear cache regularly. Clear it only when a program is misbehaving, your Mac is running low on storage space, or you want to free up disk room. If you notice your Mac slowing down and you've cleared cache without improvement, the problem is usually something else — too many programs running at once, or a full hard drive.
Does clearing cache speed up my Mac?
Clearing cache frees up disk space, which can help if your drive is nearly full. But cache itself doesn't slow down your Mac's performance while it's sitting there. If your Mac feels slow, clearing cache alone usually won't fix it. Restarting your Mac, closing unused programs, or checking Activity Monitor for programs using too much memory are more effective.
Can I clear cache for just one program?
Yes. Browser cache clears only that browser. For other programs, you can delete their cache folder manually through Terminal or Finder if you know where it's stored, but it's easier to just clear all system cache at once. Clearing one program's cache won't affect others.
What's the difference between cache and temporary files?
Cache is temporary data stored to speed things up. Temporary files are leftover scraps from programs that should have been deleted but weren't. Both take up space and both can be safely removed. When you clear cache, you're usually clearing both at once.