For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.ovhcloud.com/en/guides/bare-metal-cloud/virtual-private-servers/update-os-on-a-vps.md.

How to update the OS on a VPS

View as Markdown

Learn how to update the operating system of your OVHcloud VPS via an in-place upgrade or a side-by-side migration

Objective

Updating your server's operating system (OS) is essential to maintain the security, stability and performance of your services. To find out whether your OS version is reaching its end of support (End of Support / End of Life), see our guide Public Cloud & VPS - Image and OS life cycle.

Two approaches are possible:

  1. The in-place upgrade: the fastest and most economical method. It updates the system directly on your existing machine without changing the IP address or transferring your files.
  2. The side-by-side migration: ideal if you want to start over on a completely new environment, or test the migration in parallel without impacting your production.

This guide explains how to update the OS on your OVHcloud VPS.

Requirements

  • A VPS in your OVHcloud account
  • Root (or sudo) SSH access to your VPS
  • Having created a snapshot (or having a daily backup) before any operation

OVHcloud Control Panel Access

  • Direct link:
  • Navigation path: Bare Metal Cloud > Virtual private servers > Select your VPS

Instructions

Mandatory preliminary step: secure your VPS with a snapshot

Whichever method you choose, secure your data before any operation.

1. The automatic daily backup (VPS from August 2025 onwards)

If your VPS is from the range marketed since 7 August 2025, your server benefits from an automatic daily system backup (excluding additional disks). This backup is kept for 24 hours. In the event of a major issue, you can restore the most recent automatic image directly from your Control Panel.

2. The manual snapshot (exact state at a given moment)

To capture your server's state just before the update, create a snapshot from your OVHcloud Control Panel, as described in the guide How to use snapshots on a VPS.

The snapshot is a paid option and only one snapshot can be active at a time on a VPS. It records the state of the machine at a precise moment: application data, files, system configurations and the state of the OS (kernel, packages, dependencies). It does not, however, constitute a complete system backup. Snapshot consistency relies on the qemu-guest-agent, which is not installed by default on most distributions: check that it is present on your VPS before starting the update.

Info

Your safety net — If an interruption occurs during the update (network outage, package conflict, application inconsistency), click Restore the snapshot (or apply your latest daily backup) in the OVHcloud Control Panel to reset your VPS to its original state. Restoring deletes the snapshot: to keep one, create a new snapshot before making any other changes.

Method 1: the in-place upgrade

This is the recommended solution in most cases. It is performed directly on your current server.

Warning

Important warning — Servers with Plesk or cPanel

If your VPS uses a Plesk or cPanel management panel, do not follow the direct upgrade procedures below. Without the vendors' dedicated utilities, generic tools (Leapp, dist-upgrade) risk corrupting your installation and your licences.

  • For Plesk (switching from CentOS 7 to AlmaLinux 8): use the official centos2alma script provided by Plesk.
  • For cPanel (switching from CentOS 7 to AlmaLinux 8): use the official Elevate tool provided by cPanel.

These tools are intended for experienced users, are not guaranteed to work in every case and require a full backup before you proceed.

For all migration options (including automatic server-to-server migration tools), see the guide End of Plesk and cPanel support for VPS.

Option A: Debian and Ubuntu distributions

1. Create the snapshot

Open , select your VPS, then, from the Home tab, scroll down to the Backup box and use the ... menu of the "Snapshot" option.

2. Update the current system

Connect to your VPS via SSH and apply all the patches available for your current version:

sudo apt update
sudo apt upgrade
sudo apt full-upgrade

Review the packages that are no longer needed before removing them:

sudo apt --purge autoremove

If a new Linux kernel has been installed, restart the VPS:

sudo reboot
3. Start the major version upgrade
Ubuntu
Debian

Run the official Canonical tool:

sudo do-release-upgrade

Follow the on-screen instructions.

Warning

Points to watch during the installation

  • Information screen (apt-listchanges): if a colon (:) appears at the bottom of the screen, press q to close the notice and resume the update.
  • Modified configuration files: if the system offers to replace an existing configuration file, generally choose the maintainer's version, then check any .dpkg-old or .dpkg-dist files before restoring your customisations.
4. Restart and verification

Once the process is complete, restart your server:

sudo reboot

Check the active OS with cat /etc/os-release. If your web services and applications are working correctly, you can delete the snapshot from the OVHcloud Control Panel.

Option B: AlmaLinux, Rocky Linux and CentOS Stream distributions

For Red Hat family operating systems, the transition to version 9 uses the ELevate / Leapp framework.

1. Create the snapshot

Create the snapshot from and wait for the operation to finish before continuing.

2. Update the existing packages
sudo dnf update -y
sudo reboot
3. Install the ELevate migration tool

Install the ELevate repository, then select the data package for your distribution. For RHEL, see the official Red Hat documentation — upgrading with Leapp or migrating from RHEL 8 to RHEL 9 — rather than an ELevate data package.

# Installing the ELevate repository and the Leapp tool
sudo dnf install -y https://repo.almalinux.org/elevate/elevate-release-latest-el8.noarch.rpm
sudo yum install -y leapp-upgrade

# Installing the data package for your OS (run ONLY the relevant line):
sudo yum install -y leapp-data-almalinux    # For AlmaLinux
sudo yum install -y leapp-data-rocky        # For Rocky Linux
sudo yum install -y leapp-data-centos       # For an upgrade to CentOS Stream
4. Validate eligibility and start the upgrade

Before the upgrade, generate the initial analysis, read the Leapp report, answer the blocking questions, then start the migration:

# Run the system pre-check
sudo leapp preupgrade

# Read the detailed report before continuing
sudo less /var/log/leapp/leapp-report.txt

# Explicitly answer the blocking questions identified by the report
sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True

# Start the upgrade to version 9
sudo leapp upgrade

If a blocking error occurs during the pre-check, first correct the points reported in /var/log/leapp/leapp-report.txt. For RHEL, also refer to the official Red Hat documentation on major migrations with Leapp.

5. Switchover and completion

Restart your server to switch the kernel to version 9:

sudo reboot

The first restart can take several minutes (background package installation and SELinux relabelling).

Once the system is accessible again, check the version and clean up the migration packages:

# Check the installed version
cat /etc/os-release

# Remove the migration tools and clean the cache
sudo dnf remove -y leapp-upgrade 'leapp-data-*'
sudo dnf autoremove -y

Method 2: the side-by-side migration

This method involves deploying a second, brand-new OVHcloud VPS, installing your services on it, then switching over your data and network traffic without the risk of a prolonged interruption.

1. Order and prepare the new VPS

From the OVHcloud website or your OVHcloud Control Panel, order a new VPS with the target OS version.

Once the VPS is delivered, log in and install your services (web server, database engine, Docker, etc.).

2. Transfer your data and configurations

  • Databases: run a dump from the source VPS (mysqldump or pg_dump) then import the .sql file on the new VPS.
  • User/web files: synchronise your directories (e.g. /var/www/ or /home/) from server to server via rsync:
rsync -avz -e ssh /var/www/ root@IP_OF_THE_NEW_VPS:/var/www/
  • Management panels (e.g. Plesk, cPanel): if your VPS uses a management panel, use its built-in migration tool (Plesk Migrator / cPanel Transfer Tool) to automate the transfer of accounts and databases, or follow the guide End of Plesk and cPanel support for VPS.

3. Test the new environment

Before switching your users over, check that your website or application works on the new IP (for example by temporarily adapting your local hosts file).

4. Switch traffic to the new VPS

  • If you use an Additional IP: in your OVHcloud Control Panel, open (Network > Public IPs), then switch the Additional IP from the old VPS to the new VPS. Some products require the IP to pass through a Parking IP first, only a /32 block can be moved to a VPS, and virtual MACs are temporarily suspended during the operation: see the guide Moving an Additional IP for the detailed conditions.
  • If you use standard DNS: modify the DNS records (A / AAAA) of your domain name to point to the new IP address of your new VPS.

5. Cancel the old server

Once the switchover has been validated and the DNS propagation delays have elapsed (24 to 48 hours recommended), you can cancel the old VPS from your OVHcloud Control Panel.

In the event of an incident during the procedure

If your VPS no longer responds on the network or no longer boots after an in-place upgrade:

  1. Open then select the VPS concerned.
  2. In the Backup box, use the ... menu of the "Snapshot" option, or apply your most recent automatic backup.
  3. Click Restore the snapshot or start the restoration of the backup you want.

Your VPS returns to its original state within a few minutes.

Go further

Join our community of users.

Was this page helpful?