✓ Solved

unable to upgrade 18.04 => 20.04

I've been trying to upgrade ubuntu 18.04 to 20.04, following online articles. Basically, I have done the apt update and up upgrade, and rebooted. Then I ran the do-release-upgrade (as sudo) and it eventually gave me this message and aborted "After updating your package information, the essential package 'ubuntu-minimal' could not be located."

I'm stumped. I am basically just stuck on 18.04?

Of course, I don't really know how important it is update. 18.04 end of life is April 2023, and will security patches just stop after that? Eventually I want to update to 22.04 when it is out, but I don't know if I need to update to 20.04 first.

7 Replies

✓ Best Answer

Linodes use a local mirror of the Ubuntu package repositories to make updates faster. For a distribution upgrade you will want to use the official repositories. The following commands will backup your old sources.list and edit it to change the mirrors.linode.com sources to archive.ubuntu.com.

cp /etc/apt/sources.list /etc/apt/sources.list.backup

sed -i 's/mirrors.linode.com/archive.ubuntu.com/g' /etc/apt/sources.list

A gentle warning: In general if you can possibly avoid it, you will not want to do a release upgrade on a production system. A system that has been upgraded this way is a chimera of the old and new versions. Answers to questions for your distribution version may no longer applicable to either version, and software may unexpectedly break mysteriously. It is often preferable to deploy a fresh installation and rebuild where possible.

The problem is this: Imagine trying to rip the body off of a 2018 model car and install the parts from a 2020 model car on top of the chassis. Parts won't line up and have to be modified in unique ways to fit. You might not be able to trust the safety certifications anymore. You might loose your radio presets. If you have to work on it later, the manuals will not have accurate diagrams.


For Debian Repositories:

cp /etc/apt/sources.list /etc/apt/sources.list.backup

sed -i 's/mirrors.linode.com/deb.debian.org/g' /etc/apt/sources.list

Then I ran the do-release-upgrade (as sudo) and it eventually gave me this message and aborted "After updating your package information, the essential package 'ubuntu-minimal' could not be located."

There's something messed up with one of the files in /etc/apt/sources.d. Which file and what is wrong are things you'll have to figure out for yourself. I don't (won't) use Ubuntu anymore…

Both 18.04 and 20.04 are LTS releases. Support for an LTS release is for 5 years after release. So, support for 18.04 will end in April 2023 and support for 20.04 will end in April 2025.

Of course, I don't really know how important it is update. 18.04 end of life is April 2023, and will security patches just stop after that?

Yep.

Eventually I want to update to 22.04 when it is out, but I don't know if I need to update to 20.04 first.

Usually you would have to do this…

-- sw

Thanks. So your suggestion is to wait until 2204 comes out, create a new server, get everything setup, and move everything over? That will be a huge hassle, which is why I wanted to do it this way. But I also don't want a potentially unstable system, either. Thanks for letting me know about the pitfalls.

Thanks. So your suggestion is to wait until 2204 comes out

You're welcome…although I don't think actually said that… You can follow @hphillips advice and try to upgrade to 20.04 now.

create a new server, get everything setup, and move everything over? That will be a huge hassle, which is why I wanted to do it this way.

This is why you get the big money… ;-)

But I also don't want a potentially unstable system, either.

Actually, what I would do is get off the Ubuntu release roller coaster altogether. If you start up a new server and move, make that server run Debian 11…Ubuntu’s upstream parent.

Debian evolves much more slowly so releases are much more stable for longer periods of time. Extended support of a particular release is for roughly the same amount of time as an Ubuntu LTS release (see https://wiki.debian.org/DebianReleases ). Debian in much more oriented toward producing systems that work reliably rather some bizarre obsession with mo' biggah bettah NOW!™

<rant>
IMHO, few people in Linode's customer base need mo' biggah bettah NOW!™…they need systems that work reliably and require little care and feeding…in the words of the late, great Ron Popeil "set it and forget it". However, Canonical doesn't increase it's market share from "set it and forget it"…so they pump out releases every 3 months to keep people on their treadmill. You'd be an idiot to bring up a production system using a non-LTS release if Canonical is going to EOL it 6 months later!
</rant>

All the same tools for installing/upgrading packages (apt*, dpkg*) are present in Debian (Debian developed them…not Canonical). Upgrades of Debian systems are much more complex to do but you do them much less often (see: https://www.linode.com/docs/guides/upgrade-debian-to-the-newest-release/ ).

Unless you're heavily invested in Canonical technology (e.g., snaps), a migration from Ubuntu to Debian is pretty straightforward with few (note that few != none) pitfalls.

No doubt @andysh will have something to say here… :-)

— sw

P.S. Backups are your friend.

Thanks, @stevewi, I actually thought I was replying to @hphillips . You're right. Debian might be a better idea, for when I do switch, which might be next year.

This is why you get the big money… ;-)

Actually, no… It's a personal server for several personal sites. I don't get any money for maintaining it. I just don't want to get hacked if the security patches stop one day (I apt upgrade regularly).

Thanks.

No doubt @andysh will have something to say here… :-)

Of course, you know me well @stevewi!

For me, Ubuntu solves the biggest problem I have with all Linux distributions - additional software (such as Apache, PHP, Nginx, MySQL etc etc) versions are tied to the OS version.

With Windows, I can take any version of any of the previous mentioned software and run it on any version of Windows. With Linux, Debian version X comes with version Y of PHP, Ubuntu version X comes with version Y of PHP - you can’t run version Z unless you also upgrade Ubuntu/Debian/CentOS. And if those distributions didn’t want to ship version Z, you have to wait another 2-3 years to get it, by which time another major version has come along.

Canonical’s PPAs address that - so if you want to run the latest stuff on a stable OS, you can (providing someone was kind enough to package it.)

PHP’s development is progressing much quicker than Linux releases. I don’t want to run a short lifespan OS, but I do want the latest language features in PHP.

I personally find Ubuntu’s 2-year LTS cycle is the sweet spot between a stable system, and getting new versions of the major packages. I find Debian and CentOS’ releases just a bit too far apart. Upgrading every 2 years isn’t a hassle - and I’ve got systems that I installed on 16.04, upgraded to 18.04 and are now running on 20.04.

I agree with you, the non-LTS cycle (which is releases every 6 months, supported for 9 months) are just too quick. I was looking to switch to Fedora a while back, but didn’t for just this reason.

Canonical’s PPAs address that - so if you want to run the latest stuff on a stable OS, you can (providing someone was kind enough to package it.)

I agree that these can be handy. However, they can also be very dangerous and you can really hash up your system if you don't know what you're doing and/or aren't careful.

From my perspective, it's just as easy to install what you need from source. That way you remain the ruler of your dominion…

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct