How to Upgrade Ubuntu 20.04 to Ubuntu 22.04

Ubuntu 22.04, codename "Jammy Jellyfish", was released on the 21st of April 2022. This guide describes how to update to this version.

Before upgrading to Ubuntu 22.04, you should do the following things:

  • Back up all your files on the external drive.
  • Make sure you have a stable internet connection.
  • Disable any external repository.

In this article, I will show you how to upgrade from Ubuntu 20.04 to the new Ubuntu 22.04 in a few easy steps. Be aware that this might lead to downtime for some services.


  • A server running Ubuntu 20.04.
  • A root password is configured on the server.

Update the System

First, you must update and upgrade all your system packages to the latest version. Run the following command to update and upgrade all packages:

apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y

Next, remove all unwanted packages with the following command:

apt-get autoremove

Next, clean up the APT package cache with the following command:

apt-get clean

Next, restart your system to apply all updates:


Update to Ubuntu 22.04 using the do-release-upgrade tool

Now we can upgrade to Ubuntu 22.04 using the do-release-upgrade tool. Run this command:


Go through the upgrade steps shown on the screen. The tool will query you for input every now and then and will only continue after you choose/confirm an option.

When the tool is done, reboot your server. If this has not been done during the upgrade process, do it manually:


Verify Ubuntu 22.04 Upgrade

At this point, your server is upgraded to Ubuntu 22.04. You can now verify it using the following command:

lsb_release -a

You should see the Ubuntu version in the following output:

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


Your server is now upgraded to Ubuntu 22.04.

Share this page:

5 Comment(s)

Add comment

Please register in our forum first to comment.


By: razor7 at: 2023-01-27 20:04:12

Hi! there are some refetences to Debian 11 in the text.

By: till at: 2023-01-28 08:24:12

Thank you for the hint. I changed the sentence which referred to Debian instead of the Ubuntu version.

By: razor7 at: 2023-01-30 12:51:50

Soooo cooool! thanks!

Another question, after the upgrade (as expected) I ended up wit lñots of backup files like ~, bkp, old, dpkg-old, etc. Also there are a lot of old compressed log file (after thgree years of smooth run, that's obious).

Is there a way or command to clean up the installation of backup files and old unneeded stuff?



By: stst at: 2023-02-15 09:10:43

Thanks for this short guide.

For those using public-key authentication, make sure to update your ssh-client to the latest version, otherwise you might not be able to login to the upgraded system.

Also check /etc/apt/sources.list.d/ directory to reenable any external repositories, which were disabled automatically during upgrade.

By: Chico at: 2023-02-28 02:02:28

in the ubuntu install procvess I got errors when there was an upgrade from munin which prevent munin from starting. This ist because in the previous config file are a syntax error in line 30 and 31. After changing the content of these lines with the lines in the patch I can start munin