Introduction

Ubuntu 22.04 was released on April 21, 2022.

What are you waiting for to upgrade your Ubuntu 20.04 LTS to the next version?

In this guide, we will show you how to do it safely.

Before continuing with the guide, make a backup of the most important data.

We take no responsibility for any data loss.

Make sure the update manager is set to update to LTS versions.

cat /etc/update-manager/release-upgrades

If the output is Prompt=lts, you can proceed with the guide.


Upgrade your system

Before updating your current version of Ubuntu, make sure you have all the latest packages installed.
Run the following commands. Your server or PC will reboot, and then you can proceed safely.

If you are working as root user

apt update && apt full-upgrade -y && apt autoremove -y && apt autoclean && shutdown -r now

If you are working as normal user

sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt autoclean && shutdown -r now

Upgrade from Ubuntu 20.04 LTS to Ubuntu 22.04 LTS

Once your system is fully updated, you can start the release upgrade.

If you are working as root user

do-release-upgrade

If you are working as normal user

sudo do-release-upgrade

You will see the following message:

Reading cache

Checking package manager

Continue running under SSH?

This session appears to be running under ssh.

Continue [yN] y

Type y and press Enter.

Starting additional sshd

To continue please press [ENTER]

Press Enter to continue.

Do you want to rewrite your 'sources.list' file anyway?

Continue [yN] y

Type y and press Enter.

You will then receive the final upgrade prompt:

Do you want to start the upgrade?

Continue [yN] Details [d] y

Type y and press Enter again.

It is highly recommended that the lock screen be disabled during the upgrade.

To continue please press [ENTER]

Press Enter to start the system update.

During the upgrade, you may be asked to remove obsolete packages.

Searching for obsolete software

Remove obsolete packages?

Continue [yN] Details [d]

Type y and press Enter.

After some time, you will see a message similar to this:

System upgrade is complete.

Restart required

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

Type y and press Enter.

Once the server has restarted, verify the upgrade using:

lsb_release -a

If the output shows:

Release: 22.04

then your Ubuntu system has been successfully upgraded to Ubuntu 22.04 LTS.