Warning icon
MacPaw stands with Ukraine. Here’s how you can help our country win with just several clicks.

How to delete Safari history on Mac

7.5K views
5 min read

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: 

  1. Go to Safari
  2. In the menu bar, select History ➙ Clear History… 
  3. In the dropdown, pick an appropriate ranger (the last hour, today, today and yesterday, and all history)
  4. Click Clear History

Clearing history will remove related cookies and other website data.

If you want to delete history from Safari but not cache or website data, you can do this another way: 

  1. Launch Safari
  2. Show All History (⌘ + Y)
  3. Select all (⌘ + A)
  4. Hit Delete

Show All History

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: 

  1. Open Safari
  2. Go History ➙ Show All History (⌘ + Y) in the menu bar
  3. Just click on single pages and then Delete
  4. Alternatively, you can hold ⌘, select a few pages, and then Delete

clear one item from Safari search history

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: 

  1. Go to Safari ➙ Preferences (⌘ + ,)
  2. Switch to the Privacy tab
  3. Click Manage Website Data… 
  4. Either select Remove All, or pick a few websites to delete and click Remove

pick a website to delete search history

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: 

  1. Open Safari
  2. Go to Preferences (⌘ + ,)
  3. 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! 

Remove history items

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: 

  1. Launch the app
  2. Go to the Privacy tab
  3. Click Scan
  4. Check Safari
  5. Make sure all the items you need are selected
  6. Click Remove

remove all the locally stored items that remain after Safari browser use

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: 

  1. Go to Settings
  2. Scroll down and tap Safari
  3. Scroll again and select Clear History and Website Data
  4. 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: 

  1. Go to Settings
  2. Tap Screen Time
  3. Select Content & Privacy Restrictions
  4. Turn the toggle off
  5. 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: 

  1. Go to Settings on your iPhone
  2. Tap on your iCloud profile
  3. Tap iCloud
  4. Toggle Safari off and back on
  5. 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: 

  1. In Finder, select Go ➙ Go to Folder… (Shift + ⌘ + G)
  2. Type ~/Library/Safari and tap Enter
  3. Select the history.db file
  4. Open Time Machine from the menu bar
  5. Scroll back in time just slightly before you deleted the history item you need
  6. 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: 

  1. Launch the app
  2. Select your hard drive
  3. Click “Search for lost data” 
  4. Search for history.db
  5. Select it and click Recover

recover deleted Safari history

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. 

Get 230+ Mac apps for any job

Sign up to Setapp and try them for free.