Upgrading the Operating System Version¶
In this article
Attention
Upgrading the OS to a new major version is done at your own risk. A failure during the process can leave the server unbootable. Always create a backup before you start.
Preparing for the Upgrade¶
- Create a backup: a backup or snapshot of the VPS in Invapi (where available), plus a copy of important data on external storage — see Do-It-Yourself Backups.
- Check the free space: at least 5 GB in
/and at least 200 MB in/boot(df -h / /boot). - Read the release notes for the new version: changes in PHP, Python, and DBMS versions, as well as removed packages, can break your applications.
- Install all updates for the current version and reboot the server.
- Run the upgrade inside
screenortmuxso that a dropped SSH connection does not interrupt the process, and keep the server console open.
Upgrading Ubuntu¶
Ubuntu is upgraded sequentially between LTS releases: 20.04 → 22.04 → 24.04 → 26.04. You cannot skip a release.
The tool disables third-party repositories (PPAs), updates the repository addresses, and offers to replace modified configuration files. If you have edited the configuration manually, choose to keep the current version (N) and compare the files after the upgrade.
Note
An upgrade to a new LTS release is offered only after its first point release (for example, 26.04.1). If do-release-upgrade reports that no new release is available, check that /etc/update-manager/release-upgrades contains Prompt=lts.
After the upgrade, check the version (lsb_release -a), re-enable the PPAs you need, and remove obsolete packages: apt autoremove.
Upgrading Debian¶
Debian can also only be upgraded to the next release: 11 (bullseye) → 12 (bookworm) → 13 (trixie). Example of upgrading from 12 to 13:
-
Update the current system:
-
Replace the release codename in the package sources:
-
Run the upgrade in two stages:
-
Reboot the server and check the version:
cat /etc/debian_version.
Tip
Switch third-party repositories (Docker, PostgreSQL, NodeSource, etc.) to the new release only if packages for it are already available; otherwise, comment them out temporarily.
Upgrading RHEL-Based Systems¶
RHEL-based systems have no standard in-place upgrade with dnf. To move between major versions, use the Leapp utility and the ELevate project by AlmaLinux.
CentOS 7. CentOS 7 has reached end of life, and the official mirrors have been shut down. You can upgrade to AlmaLinux 8 or Rocky Linux 8 via ELevate:
-
Switch the repositories to the
vault.centos.orgarchive ifyum updatefails: -
Install ELevate and the data for the target OS (
leapp-data-almalinuxorleapp-data-rocky): -
Run the pre-upgrade check and resolve the issues it finds (the report is saved to
/var/log/leapp/leapp-report.txt): -
Start the upgrade and reboot the server. The process continues in the console and can take 30–60 minutes:
CentOS 8. To move to AlmaLinux 8 or Rocky Linux 8, use our guides:
- Step-by-step instructions for migrating from CentOS 8 to AlmaLinux;
- Step-by-step instructions for migrating from CentOS 8 to Rocky Linux.
AlmaLinux and Rocky Linux 8 → 9. The same ELevate sequence applies: install the elevate-release package, then leapp-upgrade and leapp-data-almalinux (or leapp-data-rocky), and run leapp preupgrade and leapp upgrade.
Attention
Leapp does not support some third-party repositories and control panels. Before upgrading, review the leapp preupgrade report as well as the documentation for ELevate and your control panel.
Upgrading Windows Server¶
Windows Server supports an in-place upgrade: upload the ISO image of the new version to the server, run setup.exe, and choose the option to keep files and apps. As a rule, you can upgrade by no more than two versions at a time (for example, 2019 → 2022 or 2025).
Attention
The new Windows Server version requires a separate license. Check the licensing terms with technical support before upgrading. An evaluation (Trial) version cannot be upgraded to a full version this way.
You can contact technical support in two ways: by email from the address specified in your account, or through the Help Center in the Invapi control panel by creating a ticket (how to create a ticket).
On servers with the domain controller or Hyper-V roles, or in a cluster, a clean installation with role migration is preferable.
GPU Servers¶
After an OS upgrade, NVIDIA and CUDA drivers built for the previous kernel stop working. Remove the old drivers and reinstall them for the new OS version — see Installing GPU NVIDIA Drivers and CUDA on Ubuntu Linux and Alma/Rocky Linux.
Clean Installation Instead of an Upgrade¶
A clean installation is more reliable than an upgrade, especially when jumping several versions or moving from CentOS 7:
- Back up your data and configuration.
- Order a new server or reinstall the current one via Invapi — see Server Reinstallation. Available systems are listed in List of supported operating systems.
- Install the software and transfer the data — see Migrating Data to a New Server.
Note
Reinstallation destroys all data on the server. If you have only one server, first copy the data to external storage or temporarily order a second server.