Linux, Web Hosting, and Everything Else in Between
Linux, Web Hosting, and Everything Else in Between

How to Upgrade to Ubuntu 22.04

How to Upgrade to Ubuntu 22.04

Ubuntu 22.04‘s release date is in April 2022, so people are getting ready to upgrade to the newer LTS release. In this tutorial, we’ll show you how to upgrade to Ubuntu 22.04.

Prerequisites

Before we begin, a few important notes:

  • You’ll need an Ubuntu machine, either desktop with access to the Terminal, or a server. It can be any Ubuntu version, including 18.04, 21.10, and more. Note: if you’re using 18.04, you’ll have to first upgrade to 20.04, and then upgrade to 22.04.
  • Root/sudo access
  • Backup before upgrading! You can lose data or cause an issue with this process, so backup all your data before upgrading.

If you use a managed server provider like SolaDrive, they will upgrade your system for you. If you’re using an unmanaged provider like Vultr, follow our tutorial below.

And finally, onto our tutorial.

Follow these steps to upgrade your Ubuntu to 22.04:

Step 1: Login as root or start Terminal

We’ll be doing this via the CLI, so either login to your server as root or open up Terminal and use su.

Step 2: Update the current packages and remove the ones that aren’t needed

Run the following commands to upgrade the packages that are currently installed on your system:

apt-get update
apt-get upgrade

Running the command below will upgrade all packages including their dependencies:

apt-get dist-upgrade

And finally, remove the packages that you no longer need with the following command:

apt-get autoremove

Step 3: Upgrade to 22.04

To run Ubuntu’s update tool, just run the following command:

do-release-upgrade

and follow the process, answer all self-explanatory prompts by the tool itself. You’ll be prompted with options to continue or not, which version of software you’d like to use, etc. The whole process might take a while depending on the internet connection and the type of machine you’re doing this on.

If the tool is not already installed on your system (it should be), run the following command to install the tool:

apt-get install update-manager-core

As of writing, Ubuntu 22.04 is still in development, so you’ll have to run the following command instead:

do-release-upgrade -d

Warning: this means you’ll use the beta version (or a version that’s still in development) so upgrade at your own risk. This is not recommended for production environments. Don’t forget to take a backup before upgrading.

Step 4: Restart your Ubuntu

To finish the upgrading process, you need to restart your Ubuntu. You can do so by running the following command:

reboot

Or whatever other rebooting method is easier for you. The tool itself will probably prompt you if you want to reboot or not.

And that’s it. You’re done.

Step 5: Check what version of Ubuntu you’re running

Run the following command to check what version of Ubuntu you’re currently running on your system:

lsb_release -a

This should give you an output similar to this:

Distributor ID: Ubuntu
Description: Ubuntu Jammy Jellyfish (development branch)
Release: 22.04
Codename: jammy

Leave a Reply to ThisHosting.Rocks Cancel reply

Your email address will not be published. Required fields are marked *

2 thoughts on “How to Upgrade to Ubuntu 22.04”