reinstall ubuntu mate 21.10 without losing data

how can I reinstall ubuntu mate 21.10 without losing my data and installed packages.Startup page of Ubiquity from thumb drive

Second screen after selecting "install"

Third screen after clicking on "continue"

Last screen before actually starting the install

1

3 Answers

You can I believe; it's a QA-test install I perform at least weekly with Lubuntu (it's a QA testcase for them).

It's called "Install using existing partition" in the Lubuntu testcases; but this type of install works with all flavor and I use it myself with Ubuntu-MATE on occasion too. See and search for "Install using existing partition" for what I've written there; where you'll note I refer to non-standard packages (clementine or a music player) & some music as examples of packages QA-testers can look for.

You perform the following steps

  • backup all data (it's easy to make a mistake)
  • boot the media you want to install
  • start ubiquity installer
  • select existing partition(s) but ensure you do NOT have format ticked for any

This will cause

  • installer will note your manually installed packages
  • erase system directories
  • install the new system
  • if internet is available install the extra packages noted earlier (you need internet available!)
  • ask to reboot (and won’t touch any user files unless you formatted)

This type of install is triggered by the lack of format.

It works with Ubuntu repository software; sorry in QA-testing only Ubuntu repository software is used, so I have little experience with it on 3rd party software. Personally I remove all 3rd party sources prior to using this install so it works cleanly if it's my own box; and add the 3rd party myself later.

It also allows you to change release; ie. I used this install because I was lazy & just upgraded 18.04 systems to 20.04 without using do-release-upgrade as it takes a fraction of the time & has the ~same result (sure metadata shows I re-installed; but the effect to me is identical! if I ignore datestamps on files & contents of history etc).

I only pass the QA-test installs WHERE packages installed prior (and I'm talking about pre-installed non-default packages from Ubuntu repositories) get re-installed. It's worked on all releases of Ubuntu-MATE (for other releases I've used it back to Ubuntu 11.04 if not further back)

ps: for at least one of my 18.04 to 20.04 installs; I'd used encrypted-partition which was a default on the initial install (maybe 17.10) but is no longer offered by default. For that machine I had to add a package during the live session before I started the installer (ubiquity) to ensure the system knew how to handle the encrypted partition, but outside of that apt install it was the same.

6

You can't.

Ubuntu is really just a collection of installed packages. Even if you reinstall the operating system in top of your existing installation, many of those packages will be overwritten.

Most user-generated data and many packages will be unaffected, but not all of them. There is no guarantee that your personal data and configurations will not be overwritten.

Additionally, reinstalling the OS without formatting might not even solve whatever problem has caused you to reinstall. It could actually spawn new problems if newly installed packages conflict with older files and configs that are not removed.

If you feel you need to reinstall the OS to fix some problem you can't otherwise solve, then you may as well do a wipe and a clean installation. Reinstalling is usually the exhaustive action you take when all else fails, so it doesn't really make much sense to do it "dirty". In either case, back up your data.

I think that you are trying to switch the flavor, which can be done via the command line, without reinstalling and data loss.

Nearly all flavors are available inside of Ubuntu's official repository, so you can just download and install them.

For example, to install Kubuntu, install the package kubuntu-desktop. For Ubuntu (the one with GNOME), install ubuntu-desktop. You can run sudo apt install <package name> in the terminal to install them. This can prevent any data loss, and keep any third-party repositories.

If you have some reasons that you have to re-install Ubuntu and not just switch flavor, refer to other answers.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like