For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.us.ovhcloud.com/en/public-cloud/compute/upgrading-operating-system.md.
  • English

Upgrading Your Operating System

View as Markdown

Learn the steps to upgrade an end-of-life operating system to a new version.

Danger

WARNING: As with any major release upgrade of an operating system there is a risk of failure, data loss, or broken software configuration. Therefore, OVHcloud strongly recommends backing up your instance and conducting extensive testing on your applications to ensure they work on the new operating system version before following this tutorial.

Info

To avoid the problems mentioned above, installing a new server with the new operating system you are upgrading to and migrating the data instead is recommended. You may still need to review differences in your application, but the operating system will likely have greater stability.

 

Requirements

 

Instructions

Tip

Click the tab for your operating system.

Debian
Ubuntu
Fedora

Before starting with the major release upgrade, make sure that you update to the latest versions of all packages installed on the current release:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get full-upgrade
Danger

WARNING: The following is an optional step. However, you must carefully review packages that are no longer needed on the system. Otherwise, the following command might break the system.

$ sudo apt-get --purge autoremove

There may have been some updates which may require a reboot and therefore we must reboot first before we start upgrading:

$ sudo systemctl reboot

After the reboot we will update the /etc/apt/sources.list to target the next release (in this case we go from Buster to Bullseye):

$ sudo cp -v /etc/apt/sources.list /root/
$ sudo cp -rv /etc/apt/sources.list.d/ /root/
$ sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
$ sudo sed -i 's/bullseye\/updates/bullseye-security/g' /etc/apt/sources.list

Now that the latest release is set as target, perform the upgrade and finally initate a reboot:

Info

You may have popups asking you about restarting services. Answer them yes.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get full-upgrade
$ sudo systemctl reboot

Verify the upgrade has worked:

$ uname -r
$ lsb_release -a

 

Go further

Browse all the Compute guides.

Browse the rest of the OVHcloud US documentation for guides on our other products and services.

Learn more about Public Cloud Compute on the OVHcloud US website.