Sunday, August 14, 2022

Upgrading to Linux Mint 21

Linux Mint 21 was recently released, and there is also an official upgrade tool to allow people to upgrade from Linux Mint 20.3. Between Ubuntu and Linux Mint, I really prefer Linux Mint, and actually run it on three systems: my desktop, the VM which I use for most of my daily stuff, and the thin client that I use to access that VM.

The thin client is most "stock" in terms of software, since I only really use it for Nomachine to access VMs. So I started my upgrade path there. I then moved on to upgrade my desktop and VM.

The process can be a bit time consuming, but it is best to be meticulous.

First, install the upgrade tool.
sudo apt install mintupgrade

Then, make sure everything is updated by running
sudo apt update
sudo apt upgrade

As my thin client runs mostly "stock", there aren't many foreign packages or PPAs. But for my desktop and VM, there are some of them. The thing to do before upgrading is to downgrade foreign packages to official versions. This is done by running the Software Sources application, choosing "Maintenance", and choosing "Downgrade foreign packages". After this, it is also a good idea to look through installed PPAs and additional repositories, and disabling those that you no longer need. (The downgrading of foreign packages is actually part of the upgrade process, but I find it easier to control what to downgrade and what to keep using the Software Sources application.)
 
For my VM, there is the next step of creating a snapshot backup. This makes it easy to roll back to Linux Mint 20.3 should the upgrade fail.

Then, run the upgrade tool.
sudo mintupgrade
 
The first part of the upgrade process involves using Timeshift to create a snapshot. This is a very good idea; do it. For my VM, I had already made a separate backup, so I skipped this step by going into "Preferences" and disabling "Recent Timeshift snapshot". For my desktop, though, I did the snapshot. (For the thin client, I skipped the snapshot too...) When you disable the preferences during the upgrade process, click on "Check again" to allow the disabled preferences to be skipped; clicking on "Fix" will, for example, run Timeshift even if you disabled that option.

Next is the upgrade process itself. Follow the prompts, but if you have a lot of non-official packages (like me), you can choose to disable "Orphan packages" in the Preferences. This allowed me to keep my installed versions of Nomachine and rpi-imager, for example.

When the entire process is completed, you will be prompted to reboot the computer. Do so, and you should boot back into Linux Mint 21.

apt-key will become deprecated, so when you next run
sudo apt update
there will be some warning about this. The way to address this is to use the steps detailed here.

No comments: