Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to delete and create a new firefox profile from TTY1?

share|improve this question
up vote 2 down vote accepted

WARNING: This will delete everything in the Firefox config - there is no undo.

With that out of the way, to do that, you can run the following in the terminal.

cd ~/.mozilla && rm -rf ./*

What that will do is change directories into the ~/.mozilla folder, then delete everything in there, including the extensions.

EDIT: Thanks to one of the comments, there is a way to backup the firefox config. To do that, follow the line below instead.

cd ~/.mozilla && mkdir backup && cp -r ./extensions ./backup && cp -r ./firefox* ./backup && rm -rf ./firefox* ./extensions

share|improve this answer
It works fine.. – karthick87 Mar 29 '11 at 14:32
To have some "undo" it's possible to just rename the directory to some other, so it can be undone later, if it's needed. – LGB Mar 29 '11 at 14:32
@LGB - Correct. – James Mar 29 '11 at 14:34
When using rm with the r flag, especially when also using the f flag, and especially when providing advice that might be followed by novice users, I recommend avoiding commands that will wipe out the whole home directory if an accidental space is added. In this situation, you can just delete the .mozilla folder along with its contents, by running rm -r .mozilla. – Eliah Kagan Aug 14 '12 at 9:27

To delete all Firefox settings type:

mv ~/.mozilla ~/.mozilla.backup

in a terminal. On next startup Firefox will create a new ~/.mozilla directory for a new session with default settings.

To restore your settings type:

mv ~/.mozilla ~/.mozilla.newbackup
mv ~/.mozilla.backup ~/.mozilla

This way you can create a variety of settings to restore when needed.

share|improve this answer
This seems to be good idea..+1 here – karthick87 Mar 30 '11 at 5:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.