Upgrade Ubuntu 20.04 LTS or 21.10 To Ubuntu 22.04 LTS
This HowTo outlines the commands to upgrade both Desktop and Server editions of Ubuntu 20.04 LTS (Focal Fossa) or Ubuntu 21.10 (Impish Indri) to Ubuntu 22.04 LTS (Jammy Jellyfish) from a terminal.
According to the Ubuntu Release Cycle, LTS or "Long Term Support" releases are published every two years in April. LTS releases are the "enterprise grade" releases of Ubuntu and are utilized the most. An estimated 95% of all Ubuntu installations are LTS releases.
Every six months between LTS versions, Canonical publishes an interim release of Ubuntu, with 21.10 being the latest example. These are production-quality releases and are supported for 9 months, with sufficient time provided for users to update, but these releases do not receive the long-term commitment of LTS releases.
- Ubuntu 20.04 LTS released April 23, 2020 and is supported for 5 years until April 2025.
- Ubuntu 21.10 (interim) released October 14, 2021 and is supported for 9 months until July 2022.
- Ubuntu 22.04 LTS released on April 21, 2022 and is supported for 5 years until April 2027.
Upgrading prior to the official release on April 21, 2022 may result in a Beta or Release Candidate installation. We strongly suggest you check Ubuntu.com for the current release status.
These steps can be preformed as an in place upgrade on a live system from either a local terminal or remote SSH session.
Prior to upgrading, make sure the current system is up-to-date by executing these three commands.
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
Upgrade to the latest release with this command, following the on-screen instructions and reboot when prompted.
If this command returns the following notification message, this means you tried to upgrade prior to the official release or the "soaking period" is still in effect.
Checking for a new Ubuntu release There is no development version of an LTS available. To upgrade to the latest non-LTS development release set Prompt=normal in /etc/update-manager/release-upgrades.
The soaking period for 21.10 will be a few days whereas 20.04 LTS will be a few months after the official release of 22.04 LTS. We can bypass this by adding the -d option to our command, following the on-screen instructions and reboot when prompted.
sudo do-release-upgrade -d
Verify your release has been upgraded.
Output will be similar to this.
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy
Clear out the local repository of retrieved package files and dependencies that are no longer required.
sudo apt clean
sudo apt autoremove