- How to upgrade
- Upgrade paths
- Upgrade checklist
- Upgrade
- do-release-upgrade
- Pre-upgrade summary
- Configuration changes
- Package removal
- Reboot
- Upgrade Ubuntu desktop
- When can I upgrade?
- Getting ready to upgrade
- 2. Launch the software updater
- 3. Follow the upgrade flow
- 4. Enjoy your shiny new Ubuntu!
- Help is always at hand.
- 5. (Optional) Upgrading to interim releases
How to upgrade
This article details how to upgrade an Ubuntu Server or Ubuntu cloud image to the next release.
Upgrade paths
Ubuntu supports the ability to upgrade from one LTS to the next LTS in sequential order. For example, a user on Ubuntu 16.04 LTS can upgrade to Ubuntu 18.04 LTS, but cannot jump directly to Ubuntu 20.04 LTS. To do this, the user would need to upgrade twice: once to Ubuntu 18.04 LTS, and then upgrade again to Ubuntu 20.04 LTS.
It is recommended that users run an LTS release as it provides 5 years of standard support and security updates. After the initial standard support, an extended support period is available via an Ubuntu Pro subscription.
For a complete list of releases and current support status see the Ubuntu Wiki Releases page.
Upgrade checklist
To ensure a successful upgrade, please review the following items:
- Check the release notes for the new release for any known issues or important changes. Release notes for each release are found on the Ubuntu Wiki Releases page.
- Fully update the system. The upgrade process works best when the current system has all the latest updates installed. Users should confirm that these commands complete successfully and that no further updates are available. It is also suggested that users reboot the system after all the updates are applied to verify they are running the latest kernel. To upgrade run the following commands:
sudo apt update sudo apt upgrade
Upgrade
It is recommended to upgrade the system using the do-release-upgrade command on Server edition and cloud images. This command can handle system configuration changes that are sometimes needed between releases.
do-release-upgrade
To begin the process run the following command:
Upgrading to a development release of Ubuntu is available using the -d flag. However, using the development release (or this flag) is not recommended for production environments.
Upgrades from one LTS to the next LTS release are only available after the first point release. For example, Ubuntu 18.04 LTS will only upgrade to Ubuntu 20.04 LTS after the 20.04.1 point release. If users wish to update before the point release (e.g., on a subset of machines to evaluate the LTS upgrade) users can force the upgrade via the -d flag.
Pre-upgrade summary
Before making any changes the command will first do some checks to verify the system is ready to update. The user will be prompted with a summary of the upgrade before proceeding. If the user accepts the changes, the process will begin to update the system’s packages:
Do you want to start the upgrade? 5 installed packages are no longer supported by Canonical. You can still get support from the community. 4 packages are going to be removed. 117 new packages are going to be installed. 424 packages are going to be upgraded. You have to download a total of 262 M. This download will take about 33 minutes with a 1Mbit DSL connection and about 10 hours with a 56k modem. Fetching and installing the upgrade can take several hours. Once the download has finished, the process cannot be canceled. Continue [yN] Details [d]
Configuration changes
It is possible during the upgrade process the user gets presented with a message to make decisions about package updates. These prompts occur when there are existing configuration files edited by the user and the new package configuration file are different. Below is an example prompt:
Configuration file '/etc/ssh/ssh_config' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** ssh_config (Y/I/N/O/D/Z) [default=N] ?
Users should look at the differences between the files and decide what to do. The default response is to keep the current version of the file. There are situations where accepting the new version, like with /boot/grub/menu.lst , is required for the system to boot correctly with the new kernel.
Package removal
After all packages are updated the user will again remove any obsolete, no longer needed, packages:
Remove obsolete packages? 30 packages are going to be removed. Continue [yN] Details [d]
Reboot
Finally, when the upgrade is complete the user is prompted to reboot the system. The system is not considered upgraded until a reboot occurs:
System upgrade is complete. Restart required To finish the upgrade, a restart is required. If you select 'y' the system will be restarted. Continue [yN]
Upgrade Ubuntu desktop
Being able to upgrade Ubuntu from one version to the next is one of Ubuntu’s best features. You benefit from getting the latest software, including new security patches, and all the upgraded technology that comes with a new release without having to reinstall and reconfigure your system.
When can I upgrade?
Ubuntu users are prompted to upgrade at different times depending on their current release.
Users on interim releases such as Ubuntu 21.10 are prompted to upgrade within a few days of the next Ubuntu release becoming available. This prompt may happen automatically, or when checking for new updates.
Users on a Long Term Supported release such as Ubuntu 20.04 LTS will be prompted to upgrade once the first point release of the following LTS is available. For Ubuntu 22.04 LTS this prompt will appear once Ubuntu 22.04.1 LTS is available.
Note: Ubuntu 22.04.1 LTS is now available and the upgrade prompt will now appear for all users.
Getting ready to upgrade
Before proceeding ensure that your software is up to date by running:
sudo apt update
sudo apt upgrade
From your terminal, entering your password and pressing Y when prompted.
Also ensure that all of your user data has been backed up. Whilst it is unlikely that data will be lost during the upgrade process, it’s better to be safe than sorry.
2. Launch the software updater
You can find the Software Updater in your application menu. This will check for updates and prompt you to upgrade if it finds a more recent Ubuntu release. If no upgrade prompt appears, you are either on the latest version of Ubuntu or upgrades to the newest release have not yet been enabled.
Please Note: If you are trying to upgrade to an interim release in future (such as the upcoming Ubuntu 22.10). You may need to change your Update settings for the prompt to appear. See ‘Upgrading to interim releases’ at the end of this tutorial.
If the Software Updater finds additional updates, install them prior to upgrading and restart your machine if needed.
Once you have no additional updates to apply. Click Upgrade… to proceed.
3. Follow the upgrade flow
From this point on, the upgrade UI will guide you through the process. First you will see a link to the release notes for the target release, detailing the newest features, improvements and known issues.
Click Upgrade to continue.
This will take you to an overview window showing you the progress of the upgrade.
As this progresses through the stages you will receive some additional prompts to progress once the upgrade requirements have been gathered.
Click Start Upgrade to continue.
To prevent the OS locking during the process, the lock screen will be disabled.
Click Close to continue.
Once the newest packages have been installed you’ll be prompted to remove the obsolete packages from the previous Ubuntu release.
You can choose to keep them, but by default it’s okay to click Remove to progress.
Despite the warning that removing packages can take several hours, this is extremely unlikely and after a minute or two you will be prompted to restart your system to complete the upgrade.
Click Restart Now to complete the upgrade
4. Enjoy your shiny new Ubuntu!
That’s it! Your machine may be slower to reboot during this final step as it completes the initial configuration but after that you’ll be up and running with the latest release of Ubuntu. We hope you enjoy all the new features and functionality it has to offer!
Help is always at hand.
If you have any issues with your upgrade process, or get stuck along the way, you can always reach out to our community.
5. (Optional) Upgrading to interim releases
Ubuntu 22.04 LTS is a Long Term Supported release and recommended for users looking for a stable development environment. Interim releases give users a chance to preview new features and updates ahead of the next LTS release. Interim releases are supported for 9 months and designed for users who want access to the lasted and greatest in Ubuntu.
If you want to be prompted to upgrade to the next interim release — Ubuntu 22.10 — which will be available later this year then you can enable it in the ‘Software & Updates’ app.
Navigate to the ‘Updates’ tab and change the menu option titled ‘Notify me of a new Ubuntu version’ to For any new version.
With this setting applied you will receive the same upgrade prompt for Ubuntu 22.10 as we saw at the beginning of this tutorial, once it has been officially released.