Resetting Gnome's Settings in Ubuntu

One of the great things about Linux is how easy it is to customize. Now unfortunately if you don't know what you're doing and sometimes even if you do know what you're doing, you can get into trouble.

I found this method to be very useful in times of stress. As you all may know everything in Linux is a file, all of the settings are files. Inside your Home folder is where all of the settings and user specific files are located. Remove these folders to reset Ubuntu/Gnome back to its default.

If you don’t have access to your graphical (GUI) desktop to delete these folders in Nautilus or you’re just stuck at the login screen, drop into command-line by pressing CTRL + ALT + F1, login to your account, and run this command:

rm -rf .gnome .gnome2 .gconf .gconfd .metacity

Return to your GUI desktop by pressing CTRL + ALT + F7

Now you should be back to normal.

Please note this will only reset Gnome-specific settings. If you are having issues with your video card, x-server, etc., this WILL NOT fix those issues.


Zach Schneider is a web developer and Linux enthusiast. Find him on Twitter, @ZKM.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

some suggestions

pat5star's picture

This is a great suggestion for anyone who screws up their desktop...thanks Zach via LJ && Kevin, the original author! ;) I remember when kde4 first came out and I messed up my desktop pretty bad while experimenting and in the end, I did a variation of this to return to the default desktop. Basically, I just removed the plasma* files in ~/.kde/share/config and rebooted, that did it.

trash ~/.kde/share/config/plasma*

Note: this is for kde4 on kubuntu...I'm not sure what files need to be removed for gnome.

I noticed a few warnings about using rm -rf and I agree. For anyone that will listen to me, I advise against using rm altogether. There is a fantastic cli program out there called trash (ubuntu repos: apt-get install trash-cli). Install it, and anytime you need to delete files use trash instead of rm. It moves whole directories or individual files to your trash bin (eg. ~/.local/share/Trash) so they can be recovered later if you realize a mistake. You can view those deleted files either through your trash applet on your desktop or in your shell by typing: list-trash. If you want to really delete the files, then you empty your trash...again through the trash applet by right-clicking on it and selecting 'Empty Trashcan' or in your shell by typing: empty-trash.

One last thing. As helpful as the original suggestions is, I highly advise against removing the directories. They contain configuration files for many other programs that may be working fine. Besides that, you just may find later that it contained something you wished you had kept. Instead of rm, I always mv directories in these instances and rename them with the date I did it and the extension '.bak'. That way, it's ok if I discovered later I did need something from it or if not, and it's a couple of weeks out since I did it, well then I can delete the whole directory.

So instead of:

rm -rf .gnome

I do:

mv .gnome .gnome-jul142010.bak

These are all fairly obvious suggestions but I can't count how many times they've saved me so I just thought I'd pass it along in the hopes I help someone else out :)

For some odd reason it is not

Anonymous's picture

For some odd reason it is not working at all. Nothing is happening.
And it says "If you don’t have access to your graphical (GUI) desktop to delete these folders in Nautilus ....".
Well i DO have access, but no clue where to find the file i have to delete.
Will someone enlighten me, the Uber-Linux-Nerd, and guide me into the direction?


Anonymous's picture

Update: It worked now. I was able to paste the proper command via Applications-> Accessories -> Terminal and i was logging out and in again, that that did the trick.
Thx anyways says the Uber-Linux-NOOB (not Nerd...yet ;))

thanx for share

eariyorum's picture

thanx for share


JShuford's picture

Nice site you have there!

...I'm not just a "troll", but also a subscriber!

doesn't all these removings

Anonymous's picture

doesn't all these removings removes application data? in gnome the email stuff, in kde the email stuff. i think this is the wrong way

this is more like 'reset user', partially.


Kevin Guertin's picture

Evolution emails are stored somewhere else.. in .evolution, I think? But you do lose your Evolution settings. You'd have to re-tell Evolution where your emails are, which I'm not sure how since I haven't used Evolution in quite a long time. I believe it has a Backup/Restore function now so you can re-import your email.

Off-Topic, but does *anybody* use Evolution?

tagMacher's picture

I ask because on Ubuntu 10.04 it seems so unusably broken - it crashes on anything and almost everything including html mail and sometimes even an address look-up. And it does it sooo slow! Is it just me? I remember the good old days with ThunderBird...

Not right

Doug.Roberts's picture

tagMacher, your experience with Ubuntu 10.04 runs opposite of mine. I found it to be extremely stable and fast. Did you do an upgrade installation, or a fresh install of 10.04? I ask because it sounds like you are dealing with a badly broken Ubuntu 10.04 installation. I'd recommend doing a complete fresh re-installation.

fresh install

tagMacher's picture

It was a fresh install - allowed full reformat of the older 8.04 system. There is just one other user who has reported the html mail problem on launchpad.

Another possible cause

Doug.Roberts's picture

Ok good, you did a fresh install. It sounds like you reformatted the root partition as part of the 10.04 install. Did you have /home as a separate partition that was reused without reformatting from the 8.04 install? If so, it is possible that you have an incompatible configuration file left over from 8.04.

Also, I have seen a case where there was a separate /usr/local partition that got reused without reformatting after an upgrade, and some of the software in there caused problems with the new system.

but then ...

tagMacher's picture

But then, the first thing I did after installation was to restore Documents folder and the .mozilla-thunderbird folder from my pre-installation 8.04 backup (made using the Simple Backup tool on 8.04 and restored with simple restore tool on 10.04) into a fresh Data-Restore folder under the new Documents folder. Then a install of Thunderbird on the new system. This had .mozilla-thunderbird as a symlink to .thunderbird, to where I moved my old thunderbird profile folder and had mail working instantly with no problems. I then realised that Sunbird is no longer available through Synaptic (wonder why) and went for the Lightning add-on to have calendar functionality. This is the point where I got greedy - I have always been dissatisfied with both Lightning and Sunbird and decided to try Evolution. Evolution did not detect Thunderbird and refused to import mail folders and settings. Went through a painful process of importing one file at a time - mail archives of several years and address books. And all the problems I listed and more exist on this system. Ubuntu does not permit happily uninstall of Evolution so a full install is the way to go I guess. But then, just shifting to Thunderbird would also work.

Not in my case

tagMacher's picture

This is a single hard disk desktop and the entire hard disk has been re-formatted, including the swap partition. The source disk passed tests so should not be a corrupt disk media, and the hard disk is good as well.

You Should Give Credit to Original Source...

Kevin Guertin's picture

...considering you practically copied word-for-word from my article in 2007.

Just sayin'. :)


Kevin Guertin's picture

Sorry for double-post... Browser issue. :)


JShuford's picture

It's not "plagiarism" it's "re-purposing"...Too funny!

...I'm not just a "troll", but also a subscriber!


JShuford's picture

"YOUR" work, recently cited:

...I'm not just a "troll", but also a subscriber!

You Should Give Credit to Original Source...

Kevin Guertin's picture

...considering you took it almost verbatim from my article in 2007:


All apologies

Zach Schneider's picture

I wasn't plagiarizing your post, this is a task that I have done for sometime now. I Read your article today and I do see the similarities. I will be more than happy to add your link in to my post. Would you like to add a blurb with your link?

Zach Schneider is a web developer and Linux enthusiast. Find him on Twitter, @ZKM.


JShuford's picture

Yours read much better!

I personally think that he should have simply asked you if he could "use" your article.

...I'm not just a "troll", but also a subscriber!


jackd's picture

You'd think the author would be embarassed now and add a credit to the original article. But apparently not.

He's well known for

Anonymous's picture

He's well known for plagiarism


JShuford's picture

Then his "work" with Linux Journal should be terminated.

...I'm not just a "troll", but also a subscriber!

What about xfce?

Anonymous's picture

How to do this trick with the XFCE environment?


JShuford's picture

IMO: Depending on which version you are using...

try: "mv ~/.config/xfce ~/.config/xfce.back"

and then: "mv ~/.cache/xfce ~/.cache/xfce.back"

I did find this for resetting XFCE Panels;


"I looked it up!" (pamphlet!)

...I'm not just a "troll", but also a subscriber!

You shouldn't ever rm -rf

Anonymous's picture

You shouldn't ever rm -rf anything. Better advice is to temporarily move those folders out of the way.

You shouldn't ever rm -rf

Anonymous's picture

I agree here... if you make typing rm -rf something you do all the time, then you might as well add the * at the end of the command. Please use common sense when computing folks.

or at least preserve root

Anonymous's picture

I would agree in general. At the very least, I always add --preserve-root just for caution's sake. (rm -rf --preserve-root blah blah blah).

At least in this example, without root privileges, nothing should happen. OTOH, some linux distros allow you to become the super user, and you may accidentally forget your status and wipe out root.

Network Manager

Ubuntu_Fan_007's picture

Will this restore my network settings to default?


JShuford's picture

IMO: You will probably need to "restore" your network settings manually!

...I'm not just a "troll", but also a subscriber!

Thanks! This is really helpful

Anonymous's picture

This is really helpful advice. One question (and probably an obvious one)... How does one change the Gnome window button position settings for Ubuntu 10.4? I'd like to have it back to where it was in 9.10 (ie. on the right side of the window title. Any ideas?


Run the following in a

mujugaba's picture

Run the following in a terminal: gconf-editor

Navigate to the following: Apps->Metacity->general

Then change the button _layout to "menu:minimize,maximize,close"

1. Launch gconf-editor 2.

keelerm's picture

1. Launch gconf-editor
2. Navigate to apps > metacity > general
3. Right click on button_layout and select "Edit Key".
4. Change the value to ":minimize,maximize,close" without the quotes.

Ubuntu Tweak is another option

Toby's picture

There are, of course, many other ways (gconf editor, using another theme) but Ubuntu Tweak also allows you to make lots of other changes easily.


tagMacher's picture

All I did to overcome this was to change the theme.

KDE settings also

Skippyboy's picture

If you want to start from scratch on KDE, just delete the .kde or .kde4 folder in your home directory with the same results.
(If you use KMail, this also deletes your email settings - so be careful)


Doug.Roberts's picture

Deleting .kde and/or .kde4 deletes all KDE application data, not just KMail data. All of your Amarok music collection data will be lost as well, for example. Ktorrent data, as another example.