How to Upgrade Ubuntu 18.04 to Ubuntu 20.04
Some of my machine are running on Ubuntu18.04 LTS version. As we now Ubuntu 20.04 has been released in past couple of months. So now i need to upgrade my Ubuntu 18.04 LTS machines to 20.04 through command line.
Ubuntu 20.04 has been released in previous couple of months and has Good review from many users, even i used it in personal laptop before moving to other machines.This latest Ubuntu code name is Focal Fossa, it was released in April 2020.
Steps to Upgrade
I think before upgrading to new OS version, we need to very careful with various application and software used on daily basis, like do new OS version support those application and features using in various task,if not then we should test and work on other alternatives on new version before move to new version. So we need to plan properly with compatibility of all application using in present scenario.
1. Create backup of Server data, configuration of machine or VM
2. Research on various application and software used in current version, test them on some test machines with new OS version.
3. Check hardware compatibility of machine with new OS version
4. Take proper downtime before going to start to such upgrade, we never know you what make it surprising.
5. If we are working on Virtual machine , i suggest please take complete snapshot of machine before start doing upgrade.
6. I suggest, please make a list of software installed on your current machine that need to present on your machine after upgrade.
So in this post we will see how we can upgrade from Ubuntu 18.04 to 20.04. This machine is plain Ubuntu 18.04 installation with some essential software in Ubuntu, There must be some many application installed on you setup that need to upgrade or support during and after upgrade process on your machine.
Ubuntu version using for this setup.
root@srv203:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.4 LTS Release: 18.04 Codename: bionic
root@srv203:~# uname -r 4.15.0-101-generic
I assume you upgrade your machine previously on latest version of Ubuntu 18.04, if not i suggest please update it to latest version first.
sudo apt update sudo apt list --upgradable sudo apt upgrade
As per machine condition it could ask to install to install latest packages before move to new version, please allow it to continue.
Then remove Any old kernel, that will help to clean some space in boot space to new kernel for Ubuntu 20.04 upgrade
apt --purge autoremove
It could possible , you find nothing to remove in above command, it depended upon how frequent you doing OS updates.
Install update-manager-core Package
This package is update manager, might not installed on your machine. So good to check, install if not present.
root@srv203:~# sudo apt install update-manager-core Reading package lists... Done Building dependency tree Reading state information... Done update-manager-core is already the newest version (1:18.04.11.13). update-manager-core set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Upgrade to Ubuntu 20.04
Now need to start upgrade from OS side execute below command from terminal side.
It could come up with below output
Checking for a new Ubuntu release There is no development version of an LTS available. To upgrade to the latest non-LTS develoment release set Prompt=normal in /etc/update-manager/release-upgrades.
In that case use -d options like below
sudo do-release-upgrade -d
It will come up with such output provided below in screen with package summary that need to install during upgrade
During this upgrade machine will ask you many times regarding some random question related to application installed and need to configure on your machine, please respond them accordingly ..
It could also ask to remove some packages that are not supported on Ubuntu 20.04 OS.
This will take some time , depending upon your internet speed and machine configuration and performance.
Finally it comes up with information that upgrade has been completed and machine reboot to get it effect
TO verify after upgrade is complete.
root@srv203:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal
So now we know how to upgrade Ubuntu 18.04 machine to Ubuntu 20.04.