this post was submitted on 09 May 2024
5 points (77.8% liked)

Linux Mint

1714 readers
1 users here now

Linux Mint is a free Linux-based operating system designed for use on desktop and laptop computers.

Want to see the latest news from the blog? Set the Firefox homepage to:

linuxmint.com/start/

where is a current or past release. Here's an example using release 21.1 'Vera':

https://linuxmint.com/start/vera/

founded 3 years ago
MODERATORS
 

I have this laptop in front of me that is still on 20.1 and I am trying to get it upgraded to latest.

This is such a pain, but I show you how I worked around it.

The GUI stuff all doesnt work. The update manager always warns about errors with mirrors, even though apt works normally. Clicking on "change mirrors" launched a password prompt but it didnt fix anything. The "package repositories" app didnt launch at all, also not from the settings.

The mintupgrade tool is not available in these repos.

Updates

Problems:

  • mintupgrade not even in the repos
  • updates are separated into "normal" and "full" updates. Really confusing, coming from Fedora
# clean up the system to make stuff quicker
sudo apt uninstall --purge#as many packages as I didnt need
sudo apt autoremove --purge

# normal updates
sudo apt update
sudo apt upgrade -y


# system upgrade to latest. Dont get the logic and the difference behind these commands
sudo apt full-upgrade -y
sudo apt dist-upgrade -y

# you should at least reboot if there was a kernel upgrade
systemctl reboot

This got me to 20.3 at least.

Went into /etc/apt/sources.list and saw that this is empty. But in sources.list.d was a single file official-package-repositories.list that had all the sources. If you use a single file, why not just use sources.list??

Distro version upgrades

Problems:

  • you need to know the next underlying Ubuntu version
  • you need to know the codenames of target mint AND ubuntu version
  • you need to change a file in an unexpected location

I did it manually: search on the internet for the codenames of both latest Mint (virginia) and the underlying Ubuntu 22.04 LTS (jammy).

So I went in there and just replaced the names with the new correct ones. Forgot the old names, was it disco and una? The automated command would be:

# update Ubuntu names
sudo sed -i 's/disco/jammy/g' /etc/apt/sources.list.d/official-package-repositories.list

# update LM versions
sudo sed -i 's/una/virginia/g' /etc/apt/sources.list.d/official-package-repositories.list

Then opened a terminal and repeated the above.

This took forever, and when I came back today the mint session had crashed and the error window didnt respond.

I exited to TTY (Ctrl+Alt+F4) and repeated the above. Package casper had conflicts. Never heard of it so tried sudo apt remove casper and it didnt try to uninstall my whole desktop (cough should have done that LTT) so I just removed it. Lol?

Repeated the steps, finished with a reboot and it worked. I am now on 21.3

Post version upgrade

Problems:

  • mints updater is kinda iffy
  • on stable distros, automatic updates should be no problem
  • unattended-upgrades needs to be installed and set up in a very traditional way

First thing I did was

sudo apt install mintupgrade nala fish unattended-upgrades -y
sudo nala upgrade

Nala is poorly pretty bloated and uses tons of python stuff, but it is way more legible and user-friendly than apt, automating tons of stuff. It does not work in non-scrolling TTYs!

Fish is a way friendlier shell but dont set it as your default! It is not POSIX compliant and will give random breakages.

The unattended upgrades are very useful. To configure them, edit this file:

sudoedit /etc/apt/apt.conf.d/50unattended-upgrades

And uncomment as many as you want.


Luckily this is not my main machine, I can recommend Fedora Atomic Desktops to anyone. I have no idea how this is supposed to be user friendly ๐Ÿ˜…

Cheers!

you are viewing a single comment's thread
view the rest of the comments
[โ€“] Maiq@lemy.lol 0 points 6 months ago (1 children)

It has been a long time since I was using mint but the last time I did a upgrade I followed this stack answer. Not sure it still works but might be worth a shot.

https://unix.stackexchange.com/questions/327808/unable-to-locate-package-mintupgrade

[โ€“] boredsquirrel@slrpnk.net 1 points 6 months ago* (last edited 5 months ago)

That is some random outdated version (19, not 20) and it advises to just change the repo without anything beforehand.

This is not good as the upgrades from some random current repos version to the new one is not stable.

You need to incrementally first to all the upgrades and then. (This is how a Debian upgrade works, it is also "what the hell, people are uses to this?" painful).

But yes I also got this mintupgrade installed, but that didnt do anything as it already had the entire upgrade.