How to delete Safari history on Mac
Every time you visit a webpage and load its URL, it gets recorded in your browser’s history. For a lot of Mac users that means Safari keeps track of all the pages they visited.
This browser history can be quite convenient. You don’t have to remember where you’ve read that article or watched that video. You can just search for it in your browser history list. Similarly, you don’t have to type out full URLs anymore — nearly all browsers support auto-completion now, so once you start typing “go” you’ll get “google.com” right away.
Browser history also syncs across your Apple devices, so you can open the same website on your iPhone or iPad instantly. Finally, when you visit websites, Safari saves its cookies and cache, so that the website loads quicker next time and remembers who you are, thus keeping you logged in, for example.
There are situations, however, where you’d rather not have Safari browsing history enabled. It might be for privacy reasons or just because you’ve mistyped a URL and now get the wrong one auto-completing every time.
Luckily, you have plenty of options to delete history from Safari.
How to clear Safari history completely
Safari gives you an easy way to remove history, cookies, and website data all at once from all iCloud-connected devices.
To clear history Safari keeps:
- Go to Safari
- In the menu bar, select History ➙ Clear History…
- In the dropdown, pick an appropriate ranger (the last hour, today, today and yesterday, and all history)
- Click Clear History
If you want to delete history from Safari but not cache or website data, you can do this another way:
- Launch Safari
- Show All History (⌘ + Y)
- Select all (⌘ + A)
- Hit Delete
How to clear one item from Safari search history on Mac
You don’t have to delete all history from Safari every time. If you want, you can just delete a single item or select a few items — it’s up to you.
To do that:
- Open Safari
- Go History ➙ Show All History (⌘ + Y) in the menu bar
- Just click on single pages and then Delete
- Alternatively, you can hold ⌘, select a few pages, and then Delete
How to clear cookies and cache in Safari
Just like sometimes it makes sense to delete history but not cookies or cache, you might imagine scenarios where you’d like to delete cache and cookies but not history. Is that possible? Yes.
To manually clear cookies and cache (and other website data) in Safari:
- Go to Safari ➙ Preferences (⌘ + ,)
- Switch to the Privacy tab
- Click Manage Website Data…
- Either select Remove All, or pick a few websites to delete and click Remove
How to clear Safari history and cookies automatically
If you want to keep your Safari history fresh and relevant, it’d be too much work to delete the files manually every time. Luckily, Safari has a built-in history remover feature:
- Open Safari
- Go to Preferences (⌘ + ,)
- In the “Remove history items” dropdown, specify whether you want to delete items after one week, one day, two weeks, one month, or one year. Done!
The above, however, won’t delete other website data. And although Safari does remove cookies that haven’t been used in 30 days, it might not be fast enough for you. So you should use an automatic solution like CleanMyMac X.
CleanMyMac X is the world’s leading Mac optimizer, fixing everything from overloaded hard drives, to slow RAM and CPU, to malware-infected software. It can also update and uninstall apps, and even help you keep your browsing private.
Here’s how to clear Safari history as well as other website data with CleanMyMac X:
- Launch the app
- Go to the Privacy tab
- Click Scan
- Check Safari
- Make sure all the items you need are selected
- Click Remove
How to clear Safari history on iPhone
If you delete history from Safari completely on your Mac, it will automatically sync to all iCloud devices. However, you have an option to clear Safari history and website data from your iPhone as well.
To do that:
- Go to Settings
- Scroll down and tap Safari
- Scroll again and select Clear History and Website Data
- Confirm
Why can’t I delete my history on Safari?
In some cases, when you go to delete history from Safari on your iPhone, you might see the option unavailable, even though you have some history items in the web browser.
This most likely happens because you have Screen Time content restrictions enabled. To turn them off:
- Go to Settings
- Tap Screen Time
- Select Content & Privacy Restrictions
- Turn the toggle off
- Proceed to clear history Safari keeps as usual
Can I recover deleted history?
There will inevitably be a moment when you wish you didn’t delete something. There are a few ways to view deleted Safari history and recover your records.
If you’ve just removed a website from Safari’s history on your Mac, you can save it with your iPhone through iCloud:
- Go to Settings on your iPhone
- Tap on your iCloud profile
- Tap iCloud
- Toggle Safari off and back on
- In the pop-up, select Merge
The history from your iPhone will now override your Mac and, hopefully, bring back your website history record.
Another option is to use Time Machine (in case you use it for backups). The way to retrieve files from Time Machine is by going to a specific folder where those files were located and activating Time Machine from there.
In the case of Safari’s history:
- In Finder, select Go ➙ Go to Folder… (Shift + ⌘ + G)
- Type ~/Library/Safari and tap Enter
- Select the history.db file
- Open Time Machine from the menu bar
- Scroll back in time just slightly before you deleted the history item you need
- Click Restore
The popularity of Time Machine has decreased over the years. At the same time, backup and recovery tools like Disk Drill have become new Mac staples.
Disk Drill is both a recovery and backup utility for your Mac. If you’ve accidentally deleted files from your Mac (and even emptied the Trash), you can still get them back with Disk Drill. You can also regularly back up your files, so you’re sure that nothing can happen to them.
To recover deleted Safari history with Disk Drill:
- Launch the app
- Select your hard drive
- Click “Search for lost data”
- Search for history.db
- Select it and click Recover
As you can see, there are a few ways to clear history Safari saves on your Mac. There’s a manual option, of course, but if you’re tired from doing things manually, CleanMyMac X can help you automate anything on your Mac. And if you’ve accidentally deleted the wrong files, get them back to your Mac quickly with Disk Drill.
Best of all, CleanMyMac X and Disk Drill are both available to you absolutely free for seven days through the trial of Setapp, a platform with more than 230 Mac and iOS apps to find a solution for any tasks, from effectively running code with CodeRunner to creating screen time lapses with Hustl. Try every Setapp app today at no cost and discover a new side to your Mac.