From MozillaZine Knowledge Base
Firefox and other Mozilla applications include preference settings that you can change in different ways, such as in the Options/Preferences dialogs, by editing configuration via about:config or, if you are an advanced user, with a user.js file. Preferences can also be added or modified by extensions (add-ons) you've installed.
Sometimes changing preference settings can have unexpected or undesired results. This article explains how you can reset preferences to the default values. It was written for Firefox but may also apply to other Mozilla applications. If you want to restore the default download actions for opening or saving files, see this article. For help resetting Firefox toolbars and controls, see this article.
Resetting preferences in about:config
You can view a list of preferences in about:config. When you change a preference setting or add a new preference, the associated about:config entry will appear in bold type with a user set status. To restore a preference setting to the default value or to remove an added preference, context-click (right-click) on the preference and select Reset.
Resetting all preferences to program defaults
If you simply want to start over with the default set of Firefox preferences, you can use one of the methods given below.
Warning! Although these methods will also work in SeaMonkey and removing the preferences file also works in Thunderbird, this is not recommended, since doing so will remove all SeaMonkey or Thunderbird mail account settings and access to saved mail and passwords will be lost.
Remove the preferences file
You can reset user preferences to the default values by manually removing the preferences file prefs.js from the profile folder, as follows. This will not affect any data stored in other files, such as toolbar data stored in the "localstore.rdf" file or any file-opening associations stored in the "mimeTypes.rdf" file.
When you next reopen Firefox, it will rebuild the prefs.js file from program defaults. This will restore the default values of preferences displayed in about:config and restores the default theme.
Another way that you can reset your user preferences to the default values is by using Safe Mode. This will rebuild the prefs.js file from program defaults, the same as if you manually deleted the file. It will not reset any preferences stored in the user.js file, if one exists.
When Firefox restarts, all user preferences will be reset to the default values.
Resetting certain preferences when a user.js file exists
If you are having problems changing certain settings but you don't want to reset all preferences to the default values, look for a user.js file in your profile folder (Windows users, read this). The user.js file does not exist by default; it is created by users or in some cases, by other software, so that certain settings get written back to the prefs.js file each time you restart your Mozilla application.
If you find a user.js file, open it in a text editor such as Notepad and remove any unwanted entries, or simply remove the user.js file from the profile folder. This will allow you to reset the associated options or preference settings, either through the Options or Preferences dialogs, or in about:config.
Software that changes preference settings
This is not a current or complete list. The following are examples of software known in the past to set certain preferences with user.js file.
Extensions (add-ons) can also change preference settings; for example:
These preference changes may have undesired consequences which remain in effect, even after disabling or uninstalling the extension. In such cases, you will need to reset the affected preferences via about:config after the extension is disabled or uninstalled. See Problematic extensions for more information.