How do I restore default settings and configuration, but keep local data, installed apps, and PPAs?

14,277

Open a terminal and try this command:

rm -r ~/.config/ ~/.cache/

and relogin. In a perfect world, this would restore a stock environment without any data loss. The world is good enough that it may work for you. However, not all software is standards compliant, so... if your login is still borked, backup everything and run:

rm -rf ~/.[^.]*

This will delete configuration for all applications. It will also delete some user information, such as your browser login information, your email credentials, save game files, etc.

Share:
14,277

Related videos on Youtube

frettfreak
Author by

frettfreak

Updated on September 18, 2022

Comments

  • frettfreak
    frettfreak over 1 year

    I'm fairly new to Ubuntu and while messing around with different things and trying out some shells, I've managed to mess my system up. Specifically I really messed up my GNOME session and can't get it to run really at all.

    Is there a way to backup my apps but reinstall or just "restore" Ubuntu to its original condition? I had tons of updates installed, downloaded and setup my machine for Android development, and a few other things with a very slow internet connection.

  • frettfreak
    frettfreak over 12 years
    First off... THANK YOU!!! I ran the first command and it seemed to fix most of the issues and i can get into the unity shell fine now. However, gnome is still borked (i only see an application and places menu now, no launcher). Would i just reinstall the gnome shell or would that result in "duplicate" version of gnome??
  • frettfreak
    frettfreak over 12 years
    edited post and put results
  • frettfreak
    frettfreak over 12 years
    the problem is that it WAS booting earlier just fine into gnome shell and i know my drivers are installed. Thats where I am getting messed up. Not sure where to go from there. there is PLENTY of hardware here that should be able to run gnome (and was) shell.