
The Terminal command lists that used to reset Safari are no longer a reliable method on current macOS, and Apple’s support pages give no command that replaces them. Safari’s data now sits in protected folders that Terminal is not allowed to change. If you cannot use Safari normally, press and hold the Shift key while you open it, then clear its data in Safari’s own settings. The steps are below, together with the two Terminal commands that still help.
Why the old Terminal reset no longer works
Older guides gave a block of commands that moved the folder ~/Library/Safari to the desktop and then deleted a list of cache, cookie and preference files with the rm command. On current macOS this fails for three reasons:
- The folders are protected. macOS guards the data of apps such as Mail, Messages and Safari. Another app can reach it only if you give that app Full Disk Access under System Settings → Privacy & Security. Terminal does not have this access unless you add it, so the commands are refused.
- The files have moved. Current Safari no longer keeps all of its settings and caches in the places the old lists name. Even with access, the commands would remove only part of the data.
- The rm command has no undo. It deletes files at once and does not use the Trash, so a typo in a path can delete something else. Apple also warns that an app with Full Disk Access can read, change and delete all the files on your Mac.
For these reasons this guide gives no deleting commands. Everything a reset needs can be done with the supported steps below.
Open Safari without its old windows
When Safari opens straight into a page that locks it up, shows fake alerts or sends you somewhere else, first open it without that page:
- Quit Safari. If it does not quit, press Option-Command-Esc, select Safari and click Force Quit.
- Press and hold the Shift key and open Safari. It starts without the windows and tabs that were open before.
This is Apple’s own advice for pop-ups and pages that will not go away. To make Safari always start this way, choose Safari → Settings, click General and set Safari opens with to A new window.
What Terminal can still do
Two commands that are described in the macOS manual help when you cannot reach Safari’s menus. Neither of them deletes Safari data. Open Terminal from Applications → Utilities, type the command and press Return.
To close a Safari that does not react:
killall Safari
To open Safari without restoring its windows:
open -F -a Safari
The manual of the open command describes the -F option as opening an app “fresh”, without restoring windows. It is the Terminal counterpart of holding the Shift key. The windows and tabs of your last session are not restored, so use it only when you do not need them.
Reset Safari in its own settings
Once Safari is open and usable, clear what it has stored. Safari has no Reset command any more, so these steps replace it:
- History. Choose History → Clear History, choose to clear all history and click Clear History. Safari removes the related cookies and website data too, so you are signed out of websites.
- Website data. Choose Safari → Settings, click Privacy, then Manage Website Data and Remove All.
- Extensions. In Safari → Settings, click Extensions. Turn off the extensions you do not need. Select any extension you do not recognize and click Uninstall.
- Homepage. Under General, check that the Homepage field shows an address you chose. Our guide shows how to change the Safari homepage.
- Notifications. Under Websites, select Notifications. Select the websites you do not want alerts from and click Remove.
Our guide on resetting and reinstalling Safari explains each of these steps in more detail.
Remove an extension without opening Safari
Safari extensions come inside apps, and Apple’s Safari guide says you can remove an extension by deleting the app that contains it. Open the Applications folder in the Finder and drag that app to the Trash.
While you are there, look for apps you do not remember installing. If pop-ups will not go away, Apple advises deleting such apps, updating macOS and restarting the Mac, because macOS removes known malware when it restarts.
If Safari does not open at all
Apple’s Safari guide gives three steps for a Safari window that will not open:
- Install the current macOS update under System Settings → General → Software Update. Safari is updated with macOS. See how to update Safari.
- Check the startup disk for errors with Disk Utility.
- If nothing else helps, reinstall macOS from macOS Recovery. This does not remove your apps or personal data, but back up your Mac first.
To find out whether the cause is in your user account, add a second user under System Settings → Users & Groups, log in to it and open Safari there. If Safari works in the new account, the cause is the software or settings of your own account and not macOS.
Before you reset
- Clearing history and website data signs you out of websites. It does not delete your bookmarks or saved passwords.
- To keep a copy of your bookmarks, choose File → Export Browsing Data to File in Safari. The export is a .zip file that is not encrypted, so store it in a safe place.
- Before you reinstall macOS, back up your Mac.
If you need a browser while Safari is out of order, you can install one from the Mac App Store without opening Safari. Ours is Kingpin, a private browser for Mac that by default remembers nothing after you quit.