This article explains how to upgrade an Ubuntu 18.04 server to version 20.04 LTS. To avoid disconnecting your SSH session during the upgrade, perform this process as the root user from the Vultr Web Console.
Before proceeding, please make a backup of your server. Then, test the backup by deploying a new instance from the backup, then verify that the test instance boots and has the correct data. If you do not make a backup before proceeding, you risk losing your data.
(Recommended) Remove unused packages and kernels to free up space on the /boot
partition.
# apt --purge autoremove
Edit the update manager configuration file.
# nano /etc/update-manager/release-upgrades
Look for the line beginning with Prompt=
. Make sure it is uncommented, and the value is lts
, as shown:
Prompt=lts
Run the upgrade tool.
# do-release-upgrade
The upgrade tool will report the number of packages to upgrade and the estimated time to complete, then request your confirmation. Type Y to proceed.
You may encounter questions such as:
When complete, you'll be prompted to restart. Enter Y to reboot and finish the upgrade.
After the reboot, log in as root and verify the proper operation of your server.
If your upgrade does not complete successfully, please restore your backup and retry. Unfortunately, in most cases, it's not possible to recover a failed upgrade to 20.04 LTS. The best practice is to restore the previous server image from the backup.