How to clear the Safari, Chrome and Firefox cache on Mac
To clear only the cache in Safari, turn on the web developer features and choose Develop > Empty Caches. In Chrome, open Delete browsing data and check only cached images and files. In Firefox, use Clear browsing data and leave only the cache checked. If you don't check cookies, you shouldn't lose your logins.
A website looks broken or keeps showing an old version. Or you check your disk and your browser uses more than you expected. Clearing the cache usually fixes it, but the button sits close to options that also remove your logins. This guide shows how to clear only what you want in Safari, Chrome and Firefox.
Menu names can change a little depending on your browser version.
What you delete and what you don’t
- Cache. Copies of parts of web pages, such as images and scripts, that make them load faster. It comes back by itself.
- Cookies and website data. What websites store to remember you, including many logins. If you delete it, you’ll have to sign in again.
- History and passwords. These are separate options. You don’t need to touch them to free up space.
Measure how much it uses first
This command only reads sizes. If a browser isn’t installed, it won’t appear in the list:
du -sh ~/Library/Caches/com.apple.Safari ~/Library/Caches/Google/Chrome ~/Library/Caches/Firefox 2>/dev/null
If the number is small, clearing the cache won’t give you much space. In that case, see How to free up space on Mac to find what uses the most.
Safari
Safari has no cache button in its regular settings. It’s in the developer menu, which you only need to turn on once:
- Open Safari > Settings > Advanced.
- Turn on Show features for web developers.
- In the menu bar, choose Develop > Empty Caches.
Don’t use History > Clear History if you only want to empty the cache. It also clears your history and, if you use iCloud for Safari, removes it from your other devices too.
If only one website has a problem
- Open Safari > Settings > Privacy.
- Click Manage Website Data.
- Find the website, select it and click Remove.
Apple warns that removing this data may sign you out of websites or change how they behave. Avoid Remove All unless you’re happy to sign in everywhere again.
Chrome
- Click More (the three dots at the top right) and choose Delete browsing data.
- Choose a time range. To free up space, use All time.
- Check Cached images and files and uncheck the rest.
- Click Delete data.
If you use several Chrome profiles, repeat these steps in each one. Google explains this in its help page on clearing cache and cookies.
Firefox
- Open Firefox > Settings > Privacy and security.
- Under Browsing data, click Clear browsing data.
- Next to When:, choose Everything and leave only Temporary cached files and pages checked.
- Click Clear.
More details in Mozilla’s help page on the cache.
What about deleting the folders by hand?
You don’t need to. If you still prefer it, quit the browser completely first and delete only that browser’s folder inside ~/Library/Caches, not the whole Caches folder.
Summary
- If you only want space or to fix a website, clear the cache and leave cookies, history and passwords unchecked.
- Safari: turn on the web developer features and choose Develop > Empty Caches.
- Chrome: in Delete browsing data, check only cached images and files.
- Firefox: in Clear browsing data, leave only the cache checked.
- The cache grows back with use: that’s normal.
To move on to the rest of your disk, read How to free up space on Mac, or download Pruneo for free.
FAQ
Does clearing the browser cache log me out?
Clearing only the cache shouldn't log you out, because logins are usually kept in cookies. If you also delete cookies and website data, you'll have to sign in again on many sites.
Does clearing the cache delete my passwords or history?
Not if you select only the cache. Passwords and history are separate options. Check which boxes are selected before you confirm.
How often should I clear my browser cache?
Only when a website misbehaves or you need the space. The cache makes pages load faster and grows back with use, so clearing it often doesn't help much.
Why does a website look the same after clearing the cache?
The problem may be in its cookies or stored data, not in the cache. Try deleting the data for that one site before deleting it for every site.