Resetter
Clean Slate
If you have totally messed up your Debian, Ubuntu, Linux Mint, elementary OS, or Linux Deepin, you can simply reset with Resetter.
In case of a broken system, beginners tend to grab a DVD or a USB stick and reinstall the system. This is fast, they think – and the thinking here is not wrong. But you do not have to resort to this anymore, thanks to Resetter [1]. Under the hood, Resetter is a Python script that supports resetting to the default installation for some distributions, much like the procedure for smartphones.
Resetter's way of working is quite simple: Using the appropriate manifest list, the tool determines which packages were originally installed (and in which versions) when the operating system was installed. Resetter will remove anything that does not match and reinstall the default packages according to the manifest. Besides two reset modes, the software offers another possibility to search Personal Package Archives (PPAs) directly in Launchpad and install them without any further manual work (via the Easy Install button).
Resetter reads the flags in Ubuntu, Linux Mint, and some other distributions to return to the state immediately after installation. The list of officially supported distributions includes the 64-bit versions of Debian 9.2 in the standard output with Gnome, Ubuntu from 14.04, Linux Mint from 17.3, elementary OS from 0.4, and Linux Deepin from 15.4.
I thoroughly tested Resetter under Linux Mint 18.3 and the current Debian "Stretch." Under Ubuntu 17.10, I could not persuade the application to cooperate; under Ubuntu MATE 17.10, even the program terminated – with bad consequences.
Easy Installation
Resetter can be set up in a flash, especially for distributions where the gdebi package is available. gdebi installs DEB packages and their dependencies downloaded from the Internet. Debian itself uses the dpkg -i <Package>
command. However, since the command does not resolve any dependencies, you need to type apt -f install
here to complete the installation.
In practice, you would usually download the two add-apt-key and resetter Debian packages directly from GitHub [2]. If necessary, set up gdebi via the package manager, and then finally use it to install the two DEBs (Listing 1). Resetter is then ready for initial use.
Listing 1
Installing the DEB Packages
$ sudo apt install gdebi $ sudo gdebi add-apt-key_1.0-0.5_all.deb $ sudo gdebi resetter_2.1.0-stable_all.deb
Before using the tool, make sure you back up, in case something goes wrong. Additionally, depending on the operating mode, Resetter may remove all user accounts and the corresponding home directories without being asked. Of course, these usually contain data that are still needed, such as browser profiles, manually customized package configurations, and the like.
Automatic or Controlled?
After starting Resetter, you will see a window with three buttons: Easy Install, Automatic Reset, and Custom Reset (Figure 1). I briefly described the function of the first button at the beginning; here, I am only interested in the main function of the program: resetting an installation. Resetter gives you the choice between an automatic and a user-controlled mode.
Automatic Reset mercilessly removes all user accounts and their home directories. If you select this, a warning prompt appears, reminding you of what you are doing (Figure 2). If you approve, Resetter first shows a window with all packages to be removed. Here you can exclude packages (Figure 3). If you do not do so, the tool removes all applications installed by the users, including packages in Snap format. Then, it creates a default account and adds any packages removed from the default installation again.
Custom Reset gives you more control over the cleanup: You decide which user accounts, packages, and dependencies (Figure 4) Resetter should keep. If you want to keep user accounts and their home directories, use this mode. You can enter a username and password for the automatically created standard user. You can also instruct the tool to remove old kernels.
Slightly Inconsistent
A system in our lab with the current Debian "Stretch," with both Gnome and the KDE Plasma desktop installed, had initial start-up problems. At program launch time, Resetter output two warnings that neither a manifest nor a user list could be found; I was told that I would have to select them; otherwise, the tool would not work. After clicking on OK, the normal start window appeared.
If you see one or both of these warnings, you will find a remedy in the File menu at the top of the application. Clicking on File reveals two menu items that refer to the error messages. Select the appropriate entry for your distribution from the two options, then click on one of the two reset variants, and the program starts. In a window, Resetter informs you where it is in the reset process and the overall progress (Figure 5). On Debian 9, it took less than five minutes to reset.
At the end, another window appears telling you that Resetter has created a new user with the name default and reveals the corresponding password. The default username and password are always the same, no matter what distribution you use. You will want to create a new username with your own password immediately after a restart.
After a reboot, my Debian test system presented itself again with the standard Gnome desktop. Resetter also worked with Linux Mint 18.3 and initially with Ubuntu MATE 17.10. However, under Ubuntu MATE, the program came to a standstill at 99 percent, which led to a system that was no longer bootable to a graphical interface. Under Ubuntu 17.10, Resetter didn't even start – I only saw a blank window.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.