The traditional way to upgrade Ubuntu 18.04 LTS to 20.04 LTS without waiting for the release of Ubuntu 20.04.01 - command do-release-upgrade
with the key -d
. But this method has been repeatedly criticized in responses and comments on this site (for example, here).
Recently, I came across a different method on the Internet:
sed -i 's/bionic/focal/g' /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot
This method, unlike the traditional one, does not have negative reviews (perhaps because it is less well-known). I tried both methods on the VM and both of them led me to get a system similar to Ubuntu 20.04 LTS (at least at first glance):
# uname -rv
5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
But which one should I choose to upgrade my production server? I understand that the ideal answer is to wait for July 23 (release date of Ubuntu 20.04.01), but what if I need to get the result right now? Which of the two evils described above is the lesser?
python
tooling Ubuntu built in, and thus timing of thedo-release-upgrade
that ensures the order of upgraded packages is controlled to prevent issues.. That method is untested, unsupported for Ubuntu. (it was popular in the early days of Ubuntu if you look back... it was then ignored as safer methods of upgrade became the norm... I'm guessing you didn't look back very far) Ubuntu is not Debian (much as I commonly think of the two as very alike)