MozillaZine

Resetting preferences

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.

Contents

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, remove the prefs.js file (and the user.js file, if it exists) from the Firefox profile folder. Firefox will rebuild the prefs.js file from program defaults. This restores the default values of all preferences displayed in about:config and will restore the default theme. This does 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.

Important: Although this will also work in Mozilla Suite/SeaMonkey and Thunderbird, it is not recommended because all mail account settings and access to saved mail and passwords will be lost.

  1. Exit Firefox completely
  2. Open the Firefox profile folder. Caution: There is also a folder named "profile" in the Firefox installation directory that contains program defaults, which some users mistake for the Firefox profile folder that stores user data. Windows users should read this to find the profile folder that contains your user data and preference settings.
  3. Delete (or move to backup) the prefs.js file. (If you find multiple numbered prefs.js files or a read-only "prefs.js.moztmp" file, delete those files as well and see this article).
  4. Delete the user.js file, if found, or move it to a backup location (this file does not exist by default).

Firefox Safe Mode

Image:Fx2Safe.png

Another way that you can reset your user preferences to the default values is by using "Firefox 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.

  1. Exit Firefox completely
  2. Start Firefox in Safe Mode. The "Firefox Safe Mode" window will appear with some troubleshooting options, as shown in this Firefox 2 screen shot.
  3. Select the option, Reset all user preferences to Firefox defaults.
  4. Click the button, Make Changes and Restart.

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 a few 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

Extensions

Extensions (add-ons) can change preference settings. For example, DownThemAll 1.0 modifies network.http settings after you use it to download a file. [3] 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 after the extension is disabled or uninstalled. See Problematic extensions for more information.

See also