Reset Safari web browser on a Mac
Issue
Safari could be stuck and every time you restart it, the window does not respond.
Restarting the computer did not improve the situation.
Solution
This will erase all your Safari Settings. Make sure you know what you are doing.
Create a new text file and save it as ResetSafari.sh
Copy and Past the following code into the file and save it.
mv ~/Library/Safari ~/Desktop/Safari-date +%Y%m%d%H%M%S
;
rm -Rf ~/Library/Cache/;
rm -Rf ~/Library/Caches/Apple\ -\ Safari\ -\ Safari\ Extensions\ Gallery;
rm -Rf ~/Library/Caches/Metadata/Safari; rm -Rf ~/Library/Caches/com.apple.Safari;
rm -Rf ~/Library/Caches/com.apple.WebKit.PluginProcess; rm -Rf ~/Library/Cookies/;
rm -Rf ~/Library/Cookies/Cookies.binarycookies;
rm -Rf ~/Library/Preferences/Apple\ -\ Safari\ -\ Safari\ Extensions\ Gallery;
rm -Rf ~/Library/Preferences/com.apple.Safari.LSSharedFileList.plist;
rm -Rf ~/Library/Preferences/com.apple.Safari.RSS.plist;
rm -Rf ~/Library/Preferences/com.apple.Safari.plist;
rm -Rf ~/Library/Preferences/com.apple.WebFoundation.plist;
rm -Rf ~/Library/Preferences/com.apple.WebKit.PluginHost.plist;
rm -Rf ~/Library/Preferences/com.apple.WebKit.PluginProcess.plist;
rm -Rf ~/Library/PubSub/Database;
rm -Rf ~/Library/Safari/*;
rm -Rf ~/Library/Safari/Bookmarks.plist;
rm -Rf ~/Library/Saved\ Application\ State/com.apple.Safari.savedState;
Open a Terminal
Run the following command if you are not sure Safari is closed properly
killall Safari
Navigate to the correct folder using the cd command
Make the script executable
chmod +x ResetSafari.sh
Run the script
.\ResetSafari.sh
Reboot the computer
Source
https://www.makeuseof.com/reset-safari-default-mac/
Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.