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.


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.

  • Caution: In Firefox 3.6 and below, the installation directory defaults/profile folder also includes a "prefs.js" file. Do not delete it by mistake.
  1. Open the Firefox profile folder (see the linked article for details).
  2. Exit Firefox completely (if open).
  3. Delete (or rename) 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).

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.


Safe Mode

Note: This method applies to Firefox 14 or below. Starting in Firefox 15, Safe Mode has been redesigned to replace individual troubleshooting options with the option to Reset Firefox.

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.

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

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:

  • Extensions installed as toolbars, often bundled with other software, can change your search or home page preferences. Toolbar add-ons that include an Internet search feature, such as the Toolbar, change the default search provider by modifying the Keyword.URL preference setting. [3] [4] These modified preferences may not be reset when you uninstall the software or extension (see Uninstalling toolbars for details).
    • Note: Instead of manually resetting your search and home page preferences to the default values, you can use the Search Reset extension by Gavin Sharp.
  • The Google Toolbar for Firefox has a "Send with Gmail" option that sets network.protocol-handler.external.mailto to false and overrides the default mail client. If the extension is uninstalled with that option set, mailto links in Firefox may stop working (to resolve, reset the preference to the default true value. See Changing the mail program used in Firefox for details). [5] [6]
    Note: the Google Toolbar is no longer supported by Google for Firefox 5 and up, see Using Google Toolbar features without toolbars
  • DownThemAll 1.0 modifies network.http preference settings after you use it to download a file. [7]
  • MegaUpload Toolbar and the Microsoft .NET Framework Assistant modify the user agent (used by websites to identify your browser) by adding an extra general.useragent preference setting. [8] [9]

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.

See also