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!
If it told you that your mirrors wouldn’t work for the task that you were trying to accomplish, then why didn’t you change them? It probably would’ve worked if you would’ve just listened to what the application was telling you. I’ve used the upgrade tool ever since it came out and have not had an issue with it.
Forgot to add. I obviously tried to open the “software sources” window and clicked the “change mirrors” button a couple of times without any result. The window didnt open at all, the button didnt do anything.
Okay overhauled the post again to be better structured