Hey guys, with the release of Ubuntu 20.04 LTS server edition, i decided it was time to upgrade my home server that’s been happily running 18.04 LTS for a year or so already. I decided to do an in situ upgrade as opposed to starting from fresh. Below I outline the commands and steps needed to achieve it.
If you’d prefer to see the video, then you can find it here:
Note to update the non-server version it’s a significantly shorter process. I’m dealing with the Server version here.
First I’ll verify what version of the distro and kernel am using (more so to check against the results at the end).
Check the version:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Check the Kernel:
Linux 4.15.0-96-generic x86_64
Update and upgrade the current packages in your existing installation:
sudo apt update
sudo apt upgrade
(If you want to check what packages are eligible for upgrade, before you upgrade you can run sudo apt list –upgradable)
Then I’d advise you to reboot the system once upgraded for good practice.
Once back up, remove unused packages
sudo apt –purge autoremove
Then update the ‘update manager’
sudo apt install update-manager-core
Now we can go ahead and perform the Distro upgrade
sudo do-release-upgrade -d
Note, we add the d flag to force the upgrade to a ‘supported’ release as opposed to a ‘development’ release.
This will fire off the actual downloading of the new packages. You’ll be faced with a few prompts. I had one about installing LXD, i opted for 4.0 (the recommended variant), as well as SSH config (I chose to keep my existing version as was using it to already connect).
There were a couple more prompts i hit Y to, and about 15minutes later I was asked if I wanted to reboot the system. Once rebooted, i double checked the release and kernel:
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Linux 5.4.0-26-generic x86_64
For good measure I just checked to make sure i had the latest of every package:
sudo apt-get upgrade && sudo apt-get upgrade -y
This came back all clear!
Happy ‘nixing 🙂
p.s. If you had some 3rd party repositories in your system, there’s a good chance they would have been disabled for the upgrade. if this is indeed the case, you can list the repos found here: cd /etc/apt/sources.list.d/ and then it’s a case of entering each repo and uncommenting the hash “#”.
This wasn’t the case for me.