mirror of
https://github.com/canonical/ubuntu-server-documentation.git
synced 2025-07-20 16:35:15 +00:00
Merge pull request #310 from st13g/266-Doc-Upgrading
Adding more context to upgrading process documentation
This commit is contained in:
@ -1,40 +1,48 @@
|
||||
(upgrade-your-release)=
|
||||
# How to upgrade your Ubuntu release
|
||||
|
||||
In this page we show how to upgrade an Ubuntu Server or Ubuntu cloud image to the next release.
|
||||
In this page we show how to upgrade an Ubuntu Server or Ubuntu cloud image to the next major release. This is different from your regular software updates.
|
||||
|
||||
We recommend running a Long Term Support (LTS) release as it provides 5 years of standard support and security updates, whereas interim releases are only supported for nine months.
|
||||
|
||||
After the initial standard support period ends for an LTS release, an extended maintenance period is available via an [Ubuntu Pro subscription](http://ubuntu.com/pro), which provides coverage for an additional five years and is available for free on up to five machines. Find out more about the [release lifecycle and support period](https://ubuntu.com/about/release-cycle) for your release.
|
||||
|
||||
## Upgrade paths
|
||||
## Understanding Upgrade Paths
|
||||
You can only upgrade from one LTS release directly to the **next sequential LTS release**. For example, if you are on Ubuntu 16.04 LTS, you can upgrade to Ubuntu 18.04 LTS.
|
||||
However, you cannot skip releases (e.g. jump from 16.04 LTS to 20.04 LTS).If you need to reach a later LTS, you will have to upgrade in stages: first to Ubuntu 18.04 LTS, then to Ubuntu 20.04 LTS, and so on.
|
||||
|
||||
Ubuntu supports the ability to upgrade from one LTS to the next 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.
|
||||
|
||||
## Pre-upgrade checklist
|
||||
|
||||
To ensure a successful upgrade, review the following items:
|
||||
Before starting a major release upgrade, it's important to prepare your system to ensure a smooth transition. This step is essential, so we need to 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](https://wiki.ubuntu.com/Releases).
|
||||
* **Review Releases notes:** Always check the **release notes** for the new Ubuntu version we are moving to. This can be found on the [Ubuntu Wiki Releases Page](https://wiki.ubuntu.com/Releases).
|
||||
|
||||
* Fully update the system. The upgrade process works best when the current system has all the latest updates installed. You should confirm that these commands complete successfully and that no further updates are available. We also suggest rebooting the system after all the updates are applied, to ensure the latest kernel is being run. To upgrade, run the following commands:
|
||||
* **Fully update the current system:** The release upgrade process requires that the current system has all the latest updates installed. This is a standard **package upgrade**: **apt update** will refresh package index database, and **apt upgrade** will download and install the latest versions of installed packages.
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
```
|
||||
1. Run these commands to ensure everything is up to date:
|
||||
|
||||
* Check that there is enough free disk space for the upgrade. Upgrading a system will include downloading new packages, which is likely to be on the order of hundreds of new packages. Systems with additional software installed may therefore require a few gigabytes of free disk space.
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
```
|
||||
2. Confirm both commands complete successfully and no further updates are available.
|
||||
|
||||
* The upgrade process takes time to complete. You should have dedicated time to participate in the upgrade process.
|
||||
3. After applying all updates, it may be necessary to **reboot your system.** The release upgrade process will let you know if that's needed, but you can also check manually before: if the file `/run/reboot-required` exists, then you will need to reboot.
|
||||
|
||||
* Third-party software repositories and personal package archives (PPAs) are disabled during the upgrade. However, any software installed from these repositories is not removed or downgraded. Software installed from these repositories is the most common cause of upgrade issues.
|
||||
* **Check that there is enough free space:** A release upgrade involves downloading hundreds of new packages, which can be several gigabytes. Make sure you have enough free disk space.
|
||||
|
||||
* Backup all your data. Although upgrades are normally safe, there is always a chance that something could go wrong. It is extremely important that the data is safely copied to a backup location to allow restoration if there are any problems during the upgrade process.
|
||||
* **Dedicate time for the upgrade:** This is an interactive process. The release upgrade will sometimes stop and ask questions, so you should monitor the upgrade and be available to respond.
|
||||
|
||||
* **Understand Third-party repositories:** Third-party software repositories and Personal Package Archives (PPAs) are disabled during the release upgrade. While software installed from these sources will not be removed, it's the most common cause of upgrade issues. Be prepared to re-enable them or find updated versions after the upgrade.
|
||||
|
||||
* **Backup all your data:** Although upgrades are normally safe, there is always a chance that something could go wrong. It is extremely important that the data is safely copied to a backup location to allow restoration if any problems occur.
|
||||
|
||||
## Upgrade the system
|
||||
|
||||
We recommend upgrading 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. To begin the process, run the following command:
|
||||
We recommend upgrading 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.
|
||||
|
||||
To start the process, run this command:
|
||||
|
||||
```bash
|
||||
sudo do-release-upgrade
|
||||
@ -48,7 +56,7 @@ Upgrades from one LTS release to the next one are only available after the first
|
||||
|
||||
### Pre-upgrade summary
|
||||
|
||||
Before making any changes the command will first do some checks to verify the system is ready to upgrade, and provide a summary of the upgrade before proceeding. If you accept the changes, the process will begin to update the system’s packages:
|
||||
Before making any changes the command `do-release-upgrade` will first do some checks to verify the system is ready to upgrade, and provide a summary of the upgrade before proceeding. If you accept the changes, the process will begin to update the system’s packages:
|
||||
|
||||
```text
|
||||
Do you want to start the upgrade?
|
||||
@ -89,9 +97,9 @@ Configuration file '/etc/ssh/ssh_config'
|
||||
|
||||
You 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
|
||||
### Removing Obsolete Packages
|
||||
|
||||
After all packages are updated, you can choose to remove any obsolete, no-longer-needed packages:
|
||||
After all packages are updated, you can choose to remove any obsolete packages that are no longer needed:
|
||||
|
||||
```text
|
||||
Remove obsolete packages?
|
||||
|
Reference in New Issue
Block a user