Easy Way to Upgrade Ubuntu 20.04 to Ubuntu 22.04

|
Last Updated:
|
|

For an easy way to upgrade Ubuntu 20.04 to Ubuntu 22.04, follow through this guide. Well, Ubuntu 22.04, code-named Jammy Jellyfish is now available for testing with official version being likely to be released on April 2020, based on the Ubuntu release cycles trend.

Upgrade Ubuntu 20.04 to Ubuntu 22.04

Disclaimer: Note that this guide is meant for testing purposes and not production environments and hence we cannot be held liable for whatever damage the processes described here may cause to your system.

Before you run system upgrade to the next major release version, ensure that you take a backup of the current system to enable you to revert back just in case things go south. The backup processes is beyond the scope of this guide.

I am currently running Ubuntu 20.04.1 release;

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

Run system Update

Begin by updating and upgrading your Ubuntu 20.04 system packages to their latest versions.

sudo apt update

Before you proceed, ENSURE you have enough disk space available.

sudo apt upgrade

You can as well run system full upgrade.

sudo apt full-upgrade

According to man 8 aptfull-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole.

Remove the packages that are no longer required.

sudo apt autoremove

Reboot the system once the upgrade completes.

sudo systemctl reboot

After reboot, you can see that it has been upgraded from 20.04.1 to 20.04.4;

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal

Upgrade Ubuntu 20.04 to Ubuntu 22.04

You can now proceed to upgrade Ubuntu 20.04 to Ubuntu 22.04.

Ubuntu ships with a command utility called, do-release-upgrade, which is used upgrade Ubuntu operating system to latest release. This utility is installed by default. If not installed, for some reasons, you can simply install update-manager-core which provides it by running;

sudo apt install update-manager-core

You can then run system upgrade to the new release version by simply executing;

do-release-upgrade

This utility supports a number of command line options. Check, do-release-upgrade -h.

For example, if you are on Ubuntu 20.04 desktop versions, you can run desktop upgrade to the new release by executing;

sudo do-release-upgrade -m desktop

To run regular upgrades for the server versions;

sudo do-release-upgrade -m server

NOTE: The do-release-upgrade command usually works only after the release of first point release of a major LTS release.

For this case, this command will only work after the availability of Ubuntu 22.04.1.

Well, if you get the output;

Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS development release 
set Prompt=normal in /etc/update-manager/release-upgrades.

then it is because Ubuntu 22.04.1 is not available yet.

As such, since we are dealing with the test releases, you can simply upgrade your Ubuntu 20.04 system to the development release version of Ubuntu 22.04. Pass the -d or --devel-release option to do-release-upgrade command.

sudo do-release-upgrade -m desktop -d

The system upgrade to the development release of Ubuntu 22.04 will start immediately you type the command above and press ENTER.

If you are doing the upgrade via SSH, an export ssh service will be opened on port 1022, this is just in case things go south and want to re-login to fix them.

NOTE it is not recommended to do the upgrade via SSH!


Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]                                                                                                                                       
Get:2 Upgrade tool [1,261 kB]                                                                                                                                              
Fetched 1,262 kB in 0s (0 B/s)                                                                                                                                             
authenticate 'jammy.tar.gz' against 'jammy.tar.gz.gpg' 
extracting 'jammy.tar.gz'

Reading cache

Checking package manager

Continue running under SSH? 

This session appears to be running under ssh. It is not recommended 
to perform a upgrade over ssh currently because in case of failure it 
is harder to recover. 

If you continue, an additional ssh daemon will be started at port 
'1022'. 
Do you want to continue? 

Continue [yN] y

Starting additional sshd 

To make recovery in case of failure easier, an additional sshd will 
be started on port '1022'. If anything goes wrong with the running 
ssh you can still connect to the additional one. 
If you run a firewall, you may need to temporarily open this port. As 
this is potentially dangerous it's not done automatically. You can 
open the port with e.g.: 
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT' 

To continue please press [ENTER]

Press ENTER to continue.


Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit http://ke.archive.ubuntu.com/ubuntu focal InRelease                                                                                                                    
Get:1 http://ke.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                                                                                                 
Get:2 http://ke.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]                                                                                               
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]                                                                                                  
Get:4 http://ke.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [278 kB]                                                                                
Get:5 http://ke.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [390 kB]                                                                            
Get:6 http://ke.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [944 B]                                                                           
Get:7 http://ke.archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [7,980 B]                                                                             
Get:8 http://ke.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [30.8 kB]                                                                         
Get:9 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [40.7 kB]                                                                                
Get:10 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [66.2 kB]                                                                           
Get:11 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2,464 B]                                                                         
Fetched 1,154 kB in 0s (0 B/s)                                                                                                                                             
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Checking for installed snaps

Calculating snap size requirements

Updating repository information
Get:1 http://ke.archive.ubuntu.com/ubuntu jammy InRelease [270 kB]                                                                                                         
Get:2 http://ke.archive.ubuntu.com/ubuntu jammy-updates InRelease [90.7 kB]                                                                                                
Get:3 http://ke.archive.ubuntu.com/ubuntu jammy-backports InRelease [90.7 kB]                                                                                              
Get:4 http://ke.archive.ubuntu.com/ubuntu jammy/main i386 Packages [1,040 kB]                                                                                              
Get:5 http://security.ubuntu.com/ubuntu jammy-security InRelease [90.7 kB]                                                                                                 
Get:6 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1,395 kB]                                                                                             
Get:7 http://ke.archive.ubuntu.com/ubuntu jammy/main Translation-en [510 kB]                                                                                               
Get:8 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 DEP-11 Metadata [424 kB]                                                                                        
Get:9 http://ke.archive.ubuntu.com/ubuntu jammy/main DEP-11 48x48 Icons [100.0 kB]                                                                                         
Get:10 http://ke.archive.ubuntu.com/ubuntu jammy/main DEP-11 64x64 Icons [148 kB]                                                                                          
Get:11 http://ke.archive.ubuntu.com/ubuntu jammy/main DEP-11 64x64@2 Icons [15.8 kB]                                                                                       
Get:12 http://ke.archive.ubuntu.com/ubuntu jammy/main amd64 c-n-f Metadata [30.3 kB]                                                                                       
Get:13 http://ke.archive.ubuntu.com/ubuntu jammy/restricted i386 Packages [30.4 kB]                                                                                        
Get:14 http://ke.archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [129 kB]                                                                                        
Get:15 http://ke.archive.ubuntu.com/ubuntu jammy/restricted Translation-en [18.6 kB]                                                                                       
Get:16 http://ke.archive.ubuntu.com/ubuntu jammy/restricted amd64 c-n-f Metadata [488 B]                                                                                   
Get:17 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [13.6 MB]                                                                                         
Get:18 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [108 B]                                                                                  
Get:19 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 c-n-f Metadata [116 B]                                                                            
Get:20 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [112 B]                                                                              
Get:21 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f Metadata [116 B]                                                                            
Get:22 http://ke.archive.ubuntu.com/ubuntu jammy/universe i386 Packages [7,761 kB]                                                                                         
Get:23 http://ke.archive.ubuntu.com/ubuntu jammy/universe Translation-en [5,651 kB]                                                                                        
Get:24 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 DEP-11 Metadata [3,564 kB]                                                                                 
Get:25 http://ke.archive.ubuntu.com/ubuntu jammy/universe DEP-11 48x48 Icons [3,447 kB]                                                                                    
Get:26 http://ke.archive.ubuntu.com/ubuntu jammy/universe DEP-11 64x64 Icons [7,609 kB]                                                                                    
Get:27 http://ke.archive.ubuntu.com/ubuntu jammy/universe DEP-11 64x64@2 Icons [69.3 kB]                                                                                   
Get:28 http://ke.archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata [286 kB]                                                                                    
Get:29 http://ke.archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [217 kB]                                                                                        
Get:30 http://ke.archive.ubuntu.com/ubuntu jammy/multiverse i386 Packages [112 kB]                                                                                         
Get:31 http://ke.archive.ubuntu.com/ubuntu jammy/multiverse Translation-en [112 kB]                                                                                        
Get:32 http://ke.archive.ubuntu.com/ubuntu jammy/multiverse amd64 DEP-11 Metadata [42.3 kB]                                                                                
Get:33 http://ke.archive.ubuntu.com/ubuntu jammy/multiverse DEP-11 48x48 Icons [42.7 kB]                                                                                   
Get:34 http://ke.archive.ubuntu.com/ubuntu jammy/multiverse DEP-11 64x64 Icons [193 kB]                                                                                    
Get:35 http://ke.archive.ubuntu.com/ubuntu jammy/multiverse DEP-11 64x64@2 Icons [214 B]                                                                                   
Get:36 http://ke.archive.ubuntu.com/ubuntu jammy/multiverse amd64 c-n-f Metadata [8,368 B]                                                                                 
Get:37 http://ke.archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [108 B]                                                                                 
Get:38 http://ke.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 c-n-f Metadata [116 B]                                                                           
Get:39 http://ke.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [112 B]                                                                             
Get:40 http://ke.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 c-n-f Metadata [116 B]                                                                           
Get:41 http://ke.archive.ubuntu.com/ubuntu jammy-backports/main amd64 c-n-f Metadata [112 B]                                                                               
Get:42 http://ke.archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 c-n-f Metadata [116 B]                                                                         
Get:43 http://ke.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 c-n-f Metadata [116 B]                                                                           
Get:44 http://ke.archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f Metadata [116 B]                                                                         
Fetched 47.1 MB in 6s (2,369 kB/s)                                                                                                                                         

Checking package manager
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Calculating the changes

Calculating the changes

Do you want to start the upgrade? 


1 installed package is no longer supported by Canonical. You can 
still get support from the community. 

13 packages are going to be removed. 244 new packages are going to be 
installed. 1546 packages are going to be upgraded. 

You have to download a total of 1,450 M. This download will take 
about 8 minutes with your connection. 

Installing the upgrade can take several hours. Once the download has 
finished, the process cannot be canceled. 

 Continue [yN]  Details [d]y

Answer through the questions that comes up during the upgrade process.

Accept the upgrade and press ENTER to continue.

During the upgrade, you will notice the changes, for example the background on the desktop versions.

When prompted to remove obsolete packages, accept and proceed.


Upgrading
Fetched 0 B in 0s (0 B/s)                                                                                                                                                  
  MarkInstall libc6:amd64 < 2.31-0ubuntu9.7 -> 2.35-0ubuntu3 @ii umU Ib > FU=1
    MarkInstall fakeroot:amd64 < 1.24-1 -> 1.28-1ubuntu1 @ii umU Ib > FU=0
    Installing libfakeroot as Depends of fakeroot
      MarkInstall libfakeroot:amd64 < 1.24-1 -> 1.28-1ubuntu1 @ii umU > FU=0
    MarkInstall locales:amd64 < 2.31-0ubuntu9.7 -> 2.35-0ubuntu3 @ii umU Ib > FU=0
    Installing libc-bin as Depends of locales
      MarkInstall libc-bin:amd64 < 2.31-0ubuntu9.7 -> 2.35-0ubuntu3 @ii umU > FU=0
  new important dependency: libnss-nis:amd64
  Installing libnss-nis as Recommends of libc6
    MarkInstall libnss-nis:amd64 < none -> 3.1-0ubuntu6 @un uN Ib > FU=0
    Installing libnsl2 as Depends of libnss-nis
      MarkInstall libnsl2:amd64 < none -> 1.3.0-2build2 @un uN Ib > FU=0
      Installing libtirpc3 as Depends of libnsl2
        MarkInstall libtirpc3:amd64 < none -> 1.3.2-2build1 @un uN Ib > FU=0
        Installing libtirpc-common as Depends of libtirpc3
          MarkInstall libtirpc-common:amd64 < none -> 1.3.2-2build1 @un uN > FU=0
  new important dependency: libnss-nisplus:amd64
  Installing libnss-nisplus as Recommends of libc6
    MarkInstall libnss-nisplus:amd64 < none -> 1.3-0ubuntu6 @un uN > FU=0
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) libc6-dev:amd64 < 2.31-0ubuntu9.7 -> 2.35-0ubuntu3 @ii umU Ib >
Broken libc6-dev:amd64 Depends on rpcsvc-proto:amd64 < none | 1.4.2-0ubuntu6 @un uH >
  Considering rpcsvc-proto:amd64 1 as a solution to libc6-dev:amd64 12
  MarkKeep libc6-dev:amd64 < 2.31-0ubuntu9.7 -> 2.35-0ubuntu3 @ii umU Ib > FU=0
  Re-Instated rpcsvc-proto:amd64
  Re-Instated libtirpc-dev:amd64
  Re-Instated libnsl-dev:amd64
  Re-Instated libc6-dev:amd64
Done

Upgrading
Fetched 0 B in 0s (0 B/s)                                                                                                                                                  
Preconfiguring packages ...
Preconfiguring packages ...
Preconfiguring packages ...
...

If upgrade desktop, mid upgrade, you will be prompted whether to upgrade to the firefox snap. Starting in Ubuntu 22.04, all new releases of firefox are only available to Ubuntu users through the snap package. This package update will transition your system over to the snap by installing it. It is recommended to close all open firefox windows before proceeding to the upgrade.

When system upgrade is complete, reboot your system.


...
System upgrade is complete.

Restart required 

To finish the upgrade, a restart is required. 
If you select 'y' the system will be restarted. 

Continue [yN] y

You have successfully upgraded your Ubuntu 20.04 to Ubuntu 22.04.

Upgrade Ubuntu 20.04 to Ubuntu 22.04
lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04 LTS
Release:	22.04
Codename:	jammy

Stay tuned to the official release of Ubuntu 22.04 for your official upgrades.

That marks the end of our tutorial on how to upgrade Ubuntu 20.04 to Ubuntu 22.04.

Other Tutorials;

Install NoMachine on Ubuntu 22.04

Install Thunderbird mail client on Ubuntu 22.04/Ubuntu 20.04

Install DBeaver on Ubuntu 22.04/Ubuntu 20.04

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

Leave a Comment