2 Ways to Upgrade Ubuntu 20.04/21.04 To 21.10 (GUI & Terminal)

Ubuntu 21.10, codenamed Impish Indri, is released on October 14, 2021. This tutorial is going to show you 2 ways to upgrade Ubuntu 20.04/Ubuntu 21.04 to 21.10. The first method uses the graphical update manager and the second method uses command line. Usually, you use the graphical update manager to upgrade Ubuntu desktop and use the command line to upgrade Ubuntu server, but the command-line method works for desktops too.

Ubuntu 20.04 is a long-term support (LTS) release, which will be supported for 5 years. Ubuntu 21.10 is a non-LTS release, which means it will be supported for 9 months only, until July 2022. If you prefer stability over bleeding edge, then stick with Ubuntu 20.04. But if you want to experience latest and greatest software, you can follow this tutorial to upgrade from Ubuntu 20.04 to 21.10.

Ubuntu 21.04 will reach end of life in January next year, so I recommend 21.04 users upgrade to Ubuntu 21.10 ASAP.

Hint: 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 20.04/Ubuntu 21.04 to 21.10 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-20.04-to-21.10

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

upgrade-ubuntu-21.04-to-21.10

Then open Software & Updates from your application menu.

upgrade-ubuntu-20.04-to-ubuntu-21.04

Select the Updates tab. At the bottom of window, change notification settings from For long-term support version to For any new version. You will be asked to enter your password for the change to take effect.

software & updates for any new version

Close the Software & Updates window. Next, open up a terminal window.

If you are using Ubuntu 21.04, issue the following command in the terminal.

update-manager

You will be notified that software is up-to-date and Ubuntu 21.10 is now available. Click the Upgrade button.

ubuntu-21.10-is-now-available

If you are using Ubuntu 20.04, issue the following command in the terminal.

update-manager

you will be notified that software is up-to-update and Ubuntu 21.04 is now available. Click the upgrade button. You need to upgrade to Ubuntu 21.04 first and then follow the same procedure to upgrade to Ubuntu 21.10. This is due to the fact that Ubuntu 21.04 is still being supported by Canonical and hasn’t reached end-of-life yet.

ubuntu 21.04 is now available

Then enter your password. The release notes window appears. Click Upgrade. 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-21.10

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 names 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 21.10
Release:	21.10
Codename:	impish

Upgrade Ubuntu 20.04/21.04 to Ubuntu 21.10 Using Command Line

You can use the command line to upgrade Ubuntu desktop or a headless server. Should you upgrade your Ubuntu server?

  • If you are running a business-critical production server like Plesk, it’s recommended to stay with Ubuntu 20.04 LTS.
  • If you are running a personal server or you have very simple applications on the server, you can upgrade it to 21.10.

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 adding the following line in /etc/ssh/sshd_config file on your server.

ClientAliveInterval 60

Save and close the file. Then restart SSH daemon.

sudo systemctl restart ssh

Also, install the screen utility on the 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. If suddenly your Internet connection drops, SSH into your server and run the following command to get the previous Screen Session ID.

screen -ls

Sample output:

There is a screen on:
	32113.pts-1.focal	(10/14/2021 03:45:29 PM)	(Detached)
1 Socket in /run/screen/S-linuxbabe.

Then you can re-attach to the previous Screen session.

screen -d -r 32113

How to Upgrade From Command Line

To upgrade to Ubuntu 21.10, run the following command to upgrade existing software.

sudo apt update && sudo apt dist-upgrade

Please note that if a new kernel is installed while running the above command, you need to reboot the system (sudo shutdown -r now) in order to continue the upgrade process.

upgrade-ubuntu-20.04-to-ubuntu-21.04-command-line

Then make sure you have update-manager-core and ubuntu-release-upgrader-core package installed.

sudo apt install update-manager-core ubuntu-release-upgrader-core

Next, edit a configuration file using nano or your preferred command line text editor.

sudo nano /etc/update-manager/release-upgrades

At the bottom of this file, change the value of Prompt from lts to normal.

Prompt=normal

ubuntu-21.04-prompt-normal

To save a file in Nano text editor, press Ctrl+O, then press Enter to confirm. To exit, press Ctrl+X. After that, run the following command to begin the upgrade process.

If you are running Ubuntu 21.04, then execute the following command and follow the on-screen instruction to upgrade to Ubuntu 21.10.

do-release-upgrade

If you are running Ubuntu 20.04, then execute the following command and follow the on-screen instruction to upgrade to Ubuntu 21.04 first. After that, follow the same steps to upgrade to Ubuntu 21.10.

do-release-upgrade

Basically, you need to press y to answer the questions.

upgrade-from-ubuntu-20.04-to-ubuntu-21.04-from-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 21.10
Release:	21.10
Codename:	impish

Recommended Reading:

Should You Use the -d Option?

The update-manager and do-release-upgrade command come with a -d option, which will cause the system to upgrade to a development release.

Currently, Ubuntu 21.10 is still considered a development release in Ubuntu release cadence, because development of Ubuntu 22.04 isn’t started yet. It will happen one week after the release of Ubuntu 21.10 and we can use the -d option before that happens. When Ubuntu 22.04 enters development, you should not use the -d option.

Please install all available updates for your release before upgrading

If you see the following message when trying to upgrade, then you need to update all packages (sudo apt update;sudo apt upgrade -y) then restart the OS and try to upgrade again.

Please install all available updates for your release before upgrading.

Sometimes your system may have some package kept on hold, which can be shown with:

sudo apt-mark showhold

You need to unhold the package.

sudo apt-mark unhold package-name

Then run

sudo apt upgrade

Sometimes, sudo apt update tells you that a package can be upgraded, but sudo apt upgrade won’t upgrade the package, then you can run the following command to list the package.

apt list --upgradable

Now you can upgrade the package.

sudo apt upgrade pacakge-name

If this is a broken package that can not be upgraded, then remove it.

sudo apt remove package-name

Conclusion

I hope this tutorial helped you upgrade Ubuntu 20.04 or Ubuntu 21.04 to Ubuntu 21.10 As always, if you found this post useful, then subscribe to our free newsletter to get new tips and tricks 🙂

Rate this tutorial
[Total: 4 Average: 5]

7 Responses to “2 Ways to Upgrade Ubuntu 20.04/21.04 To 21.10 (GUI & Terminal)

  • Xiao Guoan (Admin)
    2 years ago

    If you are still using Ubuntu 20.10, you need to upgrade to Ubuntu 21.04 first, then upgrade to 21.10.

  • Thierry
    2 years ago

    Hello,

    I updated Ubuntu from 20.04 to 21.10 according to your post but now my Nextcloud doesn’t work anymore.

    I have the following message when I try to connect.

    Do you have an idea of how to solve this problem?

    Thank you

    • Xiao Guoan (Admin)
      2 years ago

      Ubuntu 21.10 ships with PHP8.0 instead of PHP7.4, so if you use PHP7.4 for NextCloud, you need to switch it to PHP8.0.

      If you use Nginx web server with Nextcloud, then edit your Nginx config file for Nextcloud such as /etc/nginx/conf.d/nextcloud.conf.

      sudo nano /etc/nginx/conf.d/nextcloud.conf

      Find the following line.

      fastcgi_pass unix:/run/php/php7.4-fpm.sock;

      Change php7.4-fpm to php8.0-fpm.

      fastcgi_pass unix:/run/php/php8.0-fpm.sock;

      The above line can occur multiple times in the config file. You need to change all of them.
      Save and close the file. Then reload Nginx.

      sudo systemctl reload nginx
      • Thierry
        2 years ago

        Thank you for your answer, unfortunatly I use LAMP for Nextcloud.
        Do you recommand LEMP instead of LAMP?

        What I noted is that apache2 is active but if I check mariadb status I have the following

        John@Server:~$ systemctl status mariadb
        Unit mariadb.service could not be found.
        

        If I check the version, it seems to be installed

        John@Server:~$ mariadb --version
        mariadb  Ver 15.1 Distrib 10.5.12-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper
        

        I’m not sure if must install mariadb as there is already a version?
        If yes, I also need to run the mysql secure installation?

        sudo mysql_secure_installation
        

        I presume that I also need to install PHP8.0 modules with the folowing command?

        sudo apt install php8.0-fpm php8.0-gd php8.0-mysql php8.0-curl php8.0-xml php8.0-zip php8.0-intl php8.0-mbstring php8.0-bz2 php8.0-ldap php8.0-apcu php8.0-bcmath php8.0-gmp php8.0-imagick php8.0-igbinary php8.0-redis php8.0-smbclient php8.0-cli php8.0-common php8.0-opcache php8.0-readline imagemagick
        

        Thanks

    • Xiao Guoan (Admin)
      2 years ago

      Apache and Nginx are both great for Nextcloud.
      Use the following command to install PHP8.0 for Apache.

      sudo apt install php-imagick libapache2-mod-php8.0 php8.0-common php8.0-mysql php8.0-fpm php8.0-gd php8.0-curl php8.0-zip php8.0-xml php8.0-mbstring php8.0-bz2 php8.0-intl php8.0-bcmath php8.0-gmp

      Install MariaDB.

      sudo apt install mariadb-server

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