How to manually reset OS X Applications settings without reboot?

I want to reset OS X Applications settings, like TextWrangler or some other applications. I kill the TextWrangler Process in Activity Monitor, delete ~/Library/Preferences/com.barebones.textwrangler.plist, but nothing happened, settings doesn't reset. I need to reboot, then reopen the applications, and the settings are reset. Running OS X 10.10.2 (14C109)

How can I manually reset settings without reboot?


Macos X has changed over time in how it handles preferences.

It used to be in most cases that you could just quit the App and delete its preference file.

But now in many cases that will not work. Deleting the file will have no effect because the preference are read once from file and then stored in memory. Changes you then make are also only in the memory. At some point those settings are synchronised with the file. (written to file). If you delete the file before this is done a new file is created with the stored setting and you will find nothing has changed.

I am not really sure why apple changed this to this behaviour but I suspect it is related to the same reasons Apple now hides the users Library folder in part to stop people from deleting files that should not be deleted.

The tool to use if you want to do it so that the system pays attention to what you are trying to do is the unix command /usr/bin/defaults.

Make sure the App is not running.

Then in the Terminal.app found in the '/Applications/Utilities/' folder

Type the command and arguments:

/usr/bin/defaults delete ~/Library/Preferences/com.barebones.textwrangler

This will wipe the plist file. But may not trash it.

Now when you open Textwrangler the Prefs will be back to the default.

This will work with many Apps. But I cannot guarantee this for all.

As with any unix command you can screw things up easily if you do not know what you are doing.

So read up on it. defaults man page

Apple guide

Google search