- Is there a command to factory reset Ubuntu? [duplicate]
- 3 Answers 3
- How to reset Ubuntu
- Download Resetter Ubuntu Package
- Installing Resetter
- Reset Ubuntu using Resetter
- Reset using Custom Reset option
- Reset using Automatic Reset
- Essential Guide: How to Reset Ubuntu to Default Settings
- How I Reset my Ubuntu Desktop
- Just Be Careful, Ok?
Is there a command to factory reset Ubuntu? [duplicate]
I have a black screen on my PC, and I’ve somehow got in the terminal the terminal is all black and I can only do commands. Is there a command to factory reset your PC through the terminal?
This blog talks about a software which can reset Ubuntu to factory default I have not tried, but definitely worth a peek omgubuntu.co.uk/2017/03/reset-ubuntu-desktop-default-settings
Looks like you are encountering the xy problem: meta.stackexchange.com/questions/66377/what-is-the-xy-problem Isn’t your main problem the black screen? If yes then you should ask about how to fix the black screen, because you might find very simple (maybe just 1 command) answers.
3 Answers 3
- Try configuring unconfigured packages:
sudo apt-get install --reinstall ubuntu-desktop
@WaseemAhmadNaeem: Restore system and graphical environment to initial configuration (factory reset PC thru the terminal)
There is no such thing as factory reset in ubuntu. You have to run a live disk/usb drive of any linux distro and backup your data and then reinstall ubuntu.
Yes, I can confirm this only re-installing from bootable USB stick worked as the above verified answer didn’t work for me.
Running this command will reset, among other things: the apps pinned to the Unity launcher or Ubuntu Dock ; panel applets and/or indicators; monitor resolution and interface scaling; keyboard shortcuts; fonts, GTK and icon theme; window button placement, launcher behaviour; and so on.
This command will also reset any application that uses dconf to store its settings. This includes core desktop apps like Rhythmbox, Evince, Shotwell and Nautilus.
This latter point is important to keep in mind as this command may reset library settings, delete accounts, disable plugins, and/or require you to re-authenticate with online services.
On the flip it means this command is the perfect one to run when you want to reset GNOME 3 settings.
How to reset Ubuntu
New Linux users are often faced with problems due to accidental changes in their system that eventually result in unstable system performance. But what about resetting the entire operating system to its factory default settings without re-installing it using a Live CD/DVD image. That means to return your system back to the original state when it was installed the first time.
In Ubuntu-based distributions, there is a way to do this. Resetter is an open-source application that is used to reset Ubuntu to factory defaults. It detects all the applications that are installed in the system after a fresh install and removes them. Not only applications but it also removes users and their Home directories. However, if you want to prevent some applications and users from deletion, you can do that by using custom settings. The good thing about the Resetter application is that it only deletes applications and users, not the data. The reset process consists of the following processes.
- Loading installed packages
- Removing installed packages
- Cleaning up
- Installing any missing packages
- Removing old kernels
- Deleting users
In this brief guide, we are going to look at how to reset Ubuntu operating system to its factory default settings by using the Resetter application. Resetter offers two methods to reset the OS to its default factory settings i.e. using Custom Reset and Automatic Reset. Here I will describe the custom reset method. However, we will see a little about what is automatic reset and how to use the automatic reset mode to reset the system.
Resetter supports these Linux Distributions:
- Elementary OS 5.0
- Deepin OS 15.8, 15.9, 15.10
- Debian Gnome 9.6, 9.7, 9.9, 10.0, 10.1
- Debian KDE 10.0
- Linux Mint Cinnamon 18.3, 19, 19.1, 19.2
- Linux Mint 18.3 Mate
- Ubuntu Gnome 18.04, 18.10, 19.04, 20.04
- Ubuntu Unity 16.04
- Parrot OS Mate 4.7
- BunsenLabs 10.4 XFCE
I will use Ubuntu 20.04 LTS for describing the method mentioned in this article.
Download Resetter Ubuntu Package
First, we will need to download Resetter from official GitHub repository that is currently the latest version of the Resetter.
cd ~/Downloads wget https://github.com/gaining/Resetter/releases/download/v3.0.0-stable/resetter_3.0.0-stable_all.deb
Installing Resetter
After the download is completed, the next step is to install it. The downloaded setup is in .deb format. There are two ways to install it. The first is to simply double click the setup and install it. The second way is to install it using dpkg command. I will use the second way.
Press Ctrl+Alt+T to launch the Terminal application in Ubuntu. Then run the following command in Terminal to install it.
$ sudo dpkg -i resetter_3.0.0-stable_all.deb
Then run the following command:
After the installation is completed, type following command in the Terminal to launch the Resetter application.
Here is default interface of Resetter looks like:
Reset Ubuntu using Resetter
As discussed earlier, you can reset your Ubuntu OS using two options:
Reset using Custom Reset option
Custom reset allows you to decide on which applications to remove for reset and which to keep. You can also decide to keep your existing user or to create a new one. While resetting, you can choose which user to delete, and to delete only user or delete both user and its home directories. You also have the option to remove old kernels.
To start with custom reset, click on Custom Reset option in the Resetter window. It will list all packages that you can select to remove. You can also choose to remove kernels by selecting the checkbox below. Select any package that you want to remove and click on Next button.
While configuring for custom reset, it lists some packages that are missing from your system and gives you the option to install them. Select packages that you want to install and click on Next.
In custom reset, it gives you the option to keep your existing users with their Home directory or to delete them. You can choose to select one or all users from the list. When the checkbox under Delete User and Home column is checked, it will remove the user with its Home directory. Now if you want to remove the user, select it and then click Next.
When you are done with all the configurations, click on Finish to apply the changes.
Then it will ask you if you want to create a new user account. Click on Yes to create a new account, otherwise, click No.
Here I am creating a new user account.
Set your username and password for the new account and click OK.
Now it will start the reset process.
In the Terminal, you can also view the ongoing reset process.
When finished, click on Yes to reboot the system.
Reset using Automatic Reset
Use the automatic reset option to reset the Ubuntu OS completely to its default factory settings. It detects and removes all applications from the system which are installed or added after the fresh installation like Applications and the users with their home directory. However, it creates a new user during reset. Usually, it is not a recommended method for reset unless you want to reinstall the system from the very start.
To start with automatic reset, follow the below steps:
- Click on Automatic Reset option in the Resetter window. It will reset the system to its default settings and delete user accounts with their home directories. Click on Yes to continue.
- Then it will list all the packages that it will be going to remove. If you want to keep some packages, uncheck them. Then click on Ok to continue.
- It will start the reset process and creates a default user and will provide you with credentials. You will use these credentials to log in to your system next time.
- When finished, reboot your system.
So this was all about the installation and usage of Resetter in order to reset your Ubuntu OS to its factory default settings using the custom reset method. We have also discussed a little about the Automatic reset mode. You can easily use this method for reset however, it is not much recommended as it wipes out everything from the system.
Essential Guide: How to Reset Ubuntu to Default Settings
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
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:
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.
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.
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).
Home / How To / How to Reset Ubuntu to Default Settings