how to reset ubuntu
It only takes one command

Here’s a handy command line tip you can use to reset Ubuntu back to its default settings without reinstalling!

The command works on both the Unity desktop shipping in Ubuntu 16.04 LTS and the GNOME Shell desktop featured in Ubuntu 18.04 and above.

This command can even reset MATE desktop to its stock settings too, should you have it installed, of course!

But why might you want to reset Ubuntu in the first place?

You might move between different desktop environments often. You might extensively tweak your desktop. Or you might have run into conflicts and other technical issues you want to “undo”.

Or perhaps you just want that “first start” feeling without the hassle that comes from needing to do a reinstall.

Whatever the reason, using one command you can:

  • Reset Ubuntu Unity desktop to default settings
  • Reset GNOME desktop to default settings
  • Reset MATE desktop to default settings

…all at the the same time.

The command to run is:

dconf reset -f /

This command resets the apps pinned to the Ubuntu Dock; panel applets and/or indicators; monitor resolution and interface scaling; keyboard shortcuts; fonts, GTK and icon theme; window button placement, launcher behaviour; plus any settings you may have changed.

This command will reset all applications that uses dconf to store settings. This will therefore includes core desktop apps like Rhythmbox, Evince, Shotwell, Nautilus, and File Roller.

Keep that in mind before running the command that it may reset library settings, delete accounts, disable plugins, and/or require you to re-authenticate with online services.

How I Reset my Ubuntu Desktop

Here’s a tweaked Ubuntu desktop. I’ve moved the Ubuntu Dock to the bottom, rearranged the window controls, applied a different GTK theme and icon set, customised the wallpaper, and tweak various other desktop settings:

Customised Ubuntu desktop
Before the reset…

I open a terminal and ran the command above to restore Ubuntu back to its default settings.

A mere 1.5 seconds and a screen blink later my desktop was transformed back to this. It’s a ‘factory settings’ style default set up with everything in the right place, as it should be, as if this was a fresh install.

ubuntu defaults
…After the reset

Pretty impressive, huh?

A single command to reset GNOME Shell settings, reset Ubuntu theme, reset the Ubuntu desktop, and more. Using this will save you from needing to hose down your home folder, create a new user account, or — worse — perform a fresh install.

Just Be Careful, Ok?

As the dconf reset command will reset more than just the Unity, GNOME Shell and MATE desktop you should not run it idly — oh, and do make a backup of your existing desktop beforehand, especially if you’ve made extensive customisations and tweaks to any of you the desktops mentioned above.

How? Run dconf dump.

Keep in mind that this command will only affect applications and desktop settings that are stored using dconf/gsettings. It will not reset other apps (e.g., Thunderbird, Google Chrome, Clementine, and so on), affect low-level settings (e.g., drivers, kernel versions, grub), nor will it reset other desktop environments (e.g., KDE Plasma).

via Ubuntu Podcast