How to upgrade Ubuntu 20.04 to 22.04 before it’s officially released

Ubuntu 22.04 should be released on April 21, 2022, and it looks to be one of the best releases from Canonical to date. Although there aren't any awe-inspiring new features, there's so much polish that the desktop distribution feels fresh.

If that's enough to pique your interest, you'll be glad to know you can always upgrade your current release to 22.04 without much hassle.

Now, before we get into this, I feel it necessary to point out that Ubuntu 22.04 is still in beta, so you might want to hold off on upgrading production machines to this release until it's official. That being said, I've found the beta release of 22.04 to be remarkably stable. Even so, caveat emptor applies. 

If you're ready to make the migration, let me show you how this is done (fear not, it's quite easy).

To successfully upgrade, you'll need a running instance of Ubuntu Desktop 20.04 and a user with sudo privileges. With those two things available, let's get to the upgrade.

The GUI

The first thing we have to do is inform the Software & Updates tool that we want it to check for any new release. To do that, log into Ubuntu and open the Software & Updates tool from the application overview. When the app opens, click on the Updates tab and select For any new version from the Notify me of a new Ubuntu version drop-down (Figure 1).

Figure 1

ubuntuupdate1.jpg

Configuring the Software & Updates tool to check for new versions of the OS.

With that taken care of, close the Software & Updates tool.

The command line

Next, we need to head to the command line. Open the default terminal and make sure all of the installed software is upgraded to the latest release with:

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

If there are any packages that are no longer needed, clean them up with:

sudo apt-get autoremove -y

Once the upgrade completes, reboot (if the kernel is upgraded). You'll then need to install the update-manager-core with:

sudo apt-get install update-manager-core -y

Finally, issue the command:

sudo do-release-upgrade -d

The reason why we need the -d option is that Jammy Jellifish (22.04) hasn't officially been released. Once Jammy has been officially released, the command would simply be:

sudo do-release-upgrade

When prompted, answer y (or accept the default) for any question that appears. At this point, you can either sit back and watch the output fly by or take a break. Depending on the speed of your network connection and hardware and the number of applications you have installed, this process can take anywhere from 15 to 60 minutes. 

When the upgrade completes, you'll be prompted to reboot the machine. Once rebooted, log in and start enjoying Ubuntu 22.04, Jammy Jellifish. 

An even easier method

In a couple of instances, I had trouble getting Ubuntu to upgrade (the command would inform me a release wasn't available…even when using the -d option). When this happened, I turned to the GUI Updates application (after first running all the necessary update commands). For this, type the command:

sudo update-manager -d

Again, the -d option informs the service to go ahead with pre-release upgrades (such as the case with 22.04). This will open the GUI tool that will allow you to upgrade to 22.04. If prompted (Figure 2), click Upgrade.

Figure 2

ubuntuupdate2.jpg

Upgrading Ubuntu 21.10 to 22.04 via the Update Manager GUI.

Remember, this is still a beta release, so if you decide to upgrade before the full release, you might experience problems. I have yet to find anything problematic with an upgrade from Ubuntu 20.04 to 22.04, but your mileage may vary.

Source