2 Ways to Upgrade Ubuntu 21.10 To Ubuntu 22.04 (Graphical & Terminal)

Ubuntu 22.04 Jammy Jellyfish will be released on April 21, 2022. This tutorial is going to show you 2 ways to upgrade from Ubuntu 21.10 to Ubuntu 22.04: using the graphical update manager and using the command line. Normally you use the graphical update manager to upgrade Ubuntu desktop and use the command line to upgrade Ubuntu server, but the command-line method also works for desktop.

Ubuntu 22.04 New Features

  • Wayland becomes the default display server for most users.
  • Linux Kernel 5.15
  • GNOME 42
  • PHP8.1, Ruby 3.0, Python 3.10, OpenJDK 18.
  • nftables is now the default firewall backend, replacing iptables.
  • Firefox is now only available as a Snap package.
  • RDP replaces the legacy VNC as the default remote desktop protocol.
  • The scp command-line utility now supports the secure SFTP transfer mode.
  • BIND 9.18: supports DNS over TLS and DNS over HTTPS, zone transfers over TLS.
  • and many more.

Note: Before doing the upgrade, you can use the systemback program to create a bootable ISO image from your current OS. If the upgrade fails, you can easily restore your OS with the bootable ISO. Everything on your OS including software and files will be intact. If you are using a laptop, please connect your power source.

Upgrade Ubuntu 21.10 to Ubuntu 22.04 with the Graphical Update Manager

First of all, open software updater (aka update manager) from your application menu. It will update software package information. If there’s updates available, click the Install Now button and enter your password to install updates.

upgrade-ubuntu-21.10-to-ubuntu-22.04

If a new version of Linux kernel is installed, then the update manager will tell you to restart your computer. Click Restart Now.

upgrade-from-ubuntu-19.10-to-ubuntu-20.04-focal-fossa

Then open up a terminal window and issue the following command.

update-manager -d

After checking for updates, the update manager will tell you that Ubuntu 22.04 is now available. Click the Upgrade button.

upgrade-ubuntu-21.10-to-22.04-desktop

Next, enter your password. The release notes window appears. Click Upgrade.

ubuntu-22.04-jammy-jellyfish-release-notes

The distribution upgrade window will open up. If you are notified that some third-party sources are disabled, accept it. You can re-enable them after the upgrade is finished.

upgrade-ubuntu-to-version-22.04

In a few moments, you will be asked if you want to start the upgrade. Click the Start Upgrade button.

start upgrade

Wait for the upgrade process to finish. The update manager may ask you if you want to restart services during packages upgrade without asking. Tick it on and click Next button.

restart services during package upgrade without asking

After new versions of packages are installed, the update manager may ask you if you want to remove obsolete packages. I always select Remove.

remove obsolete packages

Obsolete packages are software packages whose name can’t be found in the software repository of the new Ubuntu release. The cause of obsolete packages are the following:

  • The upstream developer stops maintaining this package and there is no other person willing to take over. So the Ubuntu package maintainer decides to drop this package from the Ubuntu repository.
  • The package becomes an orphan package, which means there’s no other package that depends on it and there are very few users of this package. So the Ubuntu package maintainer decides to drop this package from the Ubuntu repository.
  • The package has a new name in the software repository of the new Ubuntu release.

After obsolete packages are removed from your system. Restart your computer and check your Ubuntu version with the following command.

lsb_release -a

Output:

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

Upgrade Ubuntu 21.10 to Ubuntu 22.04 From Command Line

You can use the command line to upgrade Ubuntu desktop or a headless server.

Keep Your SSH Session Alive

If you use SSH to log into your Ubuntu server, it’s a good idea to keep your OpenSSH session alive by using the screen utility. Install screen on the Ubuntu server:

sudo apt install screen

Then start screen:

screen

Upon the first launch, you will see an introduction text, simply press Enter to end. Then you will be able to run commands as usual.

It’s also recommended to add the following line at the bottom of the /etc/ssh/sshd_config file on your server to keep your SSH session alive.

ClientAliveInterval 60

Save and close the file. Then restart SSH daemon.

sudo systemctl restart ssh

Upgrade to Ubuntu 22.04 From Command Line

To upgrade to Ubuntu 22.04, first run the following command to upgrade existing software. (Please note that if a new Linux kernel is installed while running the following command, you need to reboot system in order to continue the upgrade process.)

sudo apt update && sudo apt dist-upgrade

Then make sure you have the update-manager-core package installed.

sudo apt install update-manager-core

After that, run the following command to begin the upgrade process.

do-release-upgrade -d

Then follow the on-screen instruction to upgrade to Ubuntu 22.04. Basically, you need to press y to answer the questions.

upgrade-ubuntu-21.10-to-22.04-from-the-command-line

The update manager may ask you if you want to restart services during packages upgrade without asking. Press the Tab key to select Yes and press Enter.

restart services during packages upgrade without asking

If you are upgrading a server, you will probably see messages like below. I recommend choosing N to keep your current version. The updated version will be available at the same directory. You can check it out later.

Package distributor has shipped an updated version

Once the upgrade is finished, reboot your Ubuntu desktop or server. To check your Ubuntu version, run:

lsb_release -a

Output:

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

How to Re-Enable Third-Party Repositories

Third-party repositories are defined in the .list files under /etc/apt/sources.list.d/ directory. First, re-enable third-party repositories with the following command, which will remove the # character in lines that begin with deb.

sudo sed -i '/deb/s/^#//g' /etc/apt/sources.list.d/*.list

Then change all instances of impish to jammy.

sudo sed -i 's/impish/jammy/g' /etc/apt/sources.list.d/*.list

Update package repository index.

sudo apt update

Some third-party repositories don’t have an entry for Ubuntu 22.04, so you will likely to see errors like:

E: The repository 'http://linux.dropbox.com/ubuntu jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

You will need to edit these repository files one by one and disable them. For example, I edit the Dropbox repository file.

sudo nano /etc/apt/sources.list.d/dropbox.list

Disable this repository by adding the # character at the beginning of the line.

# deb [arch=i386,amd64] http://linux.dropbox.com/ubuntu jammy main # disabled on upgrade to focal

Save and close the file. You need to wait for those repositories to add support for Ubuntu 22.04. Some software packages in third-party repositories might be included in 22.04. For example, Ubuntu 22.04 repository contains the nextcloud-desktop package, so I don’t need the Nextcloud PPA anymore. I can delete the Nextcloud PPA.

sudo rm /etc/apt/sources.list.d/nextcloud-client.list*

Wrapping Up

That’s it! I hope this tutorial helped you upgrade to Ubuntu 22.04 from Ubuntu 21.10. As always, if you found this post useful, then subscribe to our free newsletter to get new tutorials. You might also want to read:

Rate this tutorial
[Total: 4 Average: 5]

3 Responses to “2 Ways to Upgrade Ubuntu 21.10 To Ubuntu 22.04 (Graphical & Terminal)

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here