# Reset Safari from Terminal

**URL:** <https://forums.kodeco.com/t/reset-safari-from-terminal/131824>\
**Category:** macOS\
**Created:** [February 3, 2021, 5:54pm UTC](https://forums.kodeco.com/t/reset-safari-from-terminal/131824 "2021-02-03T17:54:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![catherinjanna](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/catherinjanna/32/81494_2.png) [@catherinjanna](https://forums.kodeco.com/u/catherinjanna)\
**Post date:** [February 3, 2021, 5:54pm UTC](https://forums.kodeco.com/t/reset-safari-from-terminal/131824/1 "2021-02-03T17:54:36Z")

</div>

I have got Bing redirect, the situation is fairly similar to the one laid down here [Bing redirect Mac virus removal from Safari, Firefox, Chrome - MacSecurity](https://macsecurity.net/view/226-bing-redirect-virus-mac). I wonder if I remove Safari with Terminal the issue is gone. Or maybe there is a command that restores Safari search and home-page settings to default. To give you a clue [Sean's Help Desk (formerly Computer User Support): Completely reset Safari to fix problems](http://seanscus.blogspot.com/2012/08/completely-reset-safari.html), there is a bunch of commands that allegedly change Safari settings, but I do not know which of these, if any, can change home-page and search preferences:  
mv ~/Library/Safari ~/Desktop/Safari-`date +%Y%m%d%H%M%S`;   
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/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/Saved\ Application\ State/com.apple.Safari.savedState

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [July 20, 2021, 9:54am UTC](https://forums.kodeco.com/t/reset-safari-from-terminal/131824/2 "2021-07-20T09:54:37Z")

</div>

This topic was automatically closed after 166 days. New replies are no longer allowed.
