How to Upgrade to Ubuntu 22.04

This post shows students and new users steps to upgrade to Ubuntu 22.04 from Ubuntu 20.04 or Ubuntu 21.10. Ubuntu 22.04 LTS (Jammy Jellyfish) was released on April 21, 2022. This version is a Long Term Support (LTS) version which will be supported for 5 years.

This release based on the Linux 5.15 LTS kernel to support newer hardware and filesystems, and additional support for OpenSSL, GCC and other packages.

The desktop version of this release supports GNOME 42 as its desktop environment and Wayland is the default display server. There are also additional packages including and many other changes to the desktop which users may find useful.

For those who want to upgrade their existing desktops and servers, they can upgrade directly to version 22.04 from Ubuntu 20.04 or Ubuntu 21.10. If you’re currently running version prior to 20.04, then you must first upgrade to Ubuntu 20.04 or Ubuntu 21.10 before you can upgrade to Ubuntu 22.04.

How to upgrade to Ubuntu 22.04 from Ubuntu 20.10 or Ubuntu 20.04

As mentioned above, Ubuntu 22.04 which was recently released is a LTS version that will be supported for five ( 5 ) years. There is a direct upgrade path from Ubuntu 20.04 or 21.10 to 22.04.

The upgrade operation runs with superuser privileges so you must be logged in as root or member of sudoers file.

How to Back up Ubuntu

Before upgrading Ubuntu, your first task should be to take a backup of your current system so you can restore if something unexpected happens when upgrading.

How to back up Ubuntu

How to update Ubuntu

Also, before upgrading to any latest Ubuntu version, one should also update current packages that are installed if new versions are available.

If you have packages held back for any reason, you may want to release the hold and maybe upgrade to the latest version. Run the commands below to show any packages being held back from upgrade.

sudo apt-mark showhold

To release the hold, run the commands below, replacing package_name with the name of the package being held back.

sudo apt-mark unhold package_name

Next, run the commands below to update all current packages currently installed.

sudo apt update
sudo apt upgrade

Next, run the commands below to perform full upgrade so that packages which may prevent your machine from upgrading are removed.

sudo apt full-upgrade
sudo apt --purge autoremove

Upgrade to Ubuntu 22.04

Now that your system has been updated and rebooted, you can now start upgrading to the latest version of Ubuntu.

Ubuntu comes with an upgrade package called “update-manager-core” which is installed by default on both desktops and servers. If it’s not already installed, you can run the commands below to do so.

sudo apt install update-manager-core

Once the package is installed, make sure that the default upgrade policy in the /etc/update-manager/release-upgrades file is set to “Prompt=normal” or “Prompt=lts”.

If the option is set to lts but still unable to upgrade, change to normal and try again.

Finally, run the commands below to start the upgrade process

sudo do-release-upgrade

During the upgrade process you’ll be prompted and asked various questions, like whether you want to keep an existing configuration file or to install the package maintainer’s version.

In most cases if you haven’t done lots of custom configurations, you can safely type Y for Yes.

Wait for the upgrade process to complete. Once the process is done, you’ll be prompted to reboot.

After rebooting, run the commands below to verify that your Ubuntu system was upgraded.

lsb_release -a

You should see something similar to the lines below:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04 LTS
Release:	22.04
Codename:	jammy

Related post:

How to upgrade Ubuntu desktop

Conclusion:

This post showed you how to upgrade Ubuntu. If you find any error above or have something to add, please use the comment form below.