Mac OS X

Command Line Managed Options in Safari 4

Safari 4 has a predictive search option, as was previously available with various 3rd party apps and with Firefox. This predictive search also has a short list of recently used search strings. When you use the Empty Cache… option it doesn’t clear out the recent searches. Being curious about how to do clear them (without doing a repetitive search through the list with random data) I went hunting. These are stored in RecentSearchStrings in the com.apple.safari domain. To clear them out, simply issue the following command:

defaults delete com.apple.safari RecentSearchStrings

Now quit Safari and re-open and viola, a fresh, new empty list.  Another item that can be managed with the com.apple.Safari preferences is the new Top Sites feature.  To disable it, you can use the following command:

defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2

Another tip with Safari Beta 4 is

BTW, just realized this works for Safari 3 as well…