Updated: 28 September 2026 · Applies to: CentOS 7/8, AlmaLinux, Rocky Linux and Oracle Linux

CentOS Linux 7 and 8 are end of life. You can switch a CentOS system to another Red Hat-compatible distribution in place, without reinstalling. Oracle Linux is one option; AlmaLinux and Rocky Linux, both free and community-run, are others (Ucartz offers AlmaLinux and Rocky Linux on its servers).

Note: Take a backup before you change partitions or upgrade the operating system. A mistake can make data unreadable or the server unbootable.

Oracle Linux

Oracle's migration script (a community effort, not officially supported by Oracle) switches CentOS 7.9, CentOS 8.4+, CentOS Stream, AlmaLinux and Rocky Linux to the same major version of Oracle Linux:

curl -O https://raw.githubusercontent.com/oracle/migrate-to-ol/main/migrate-to-oracle-linux.sh
bash migrate-to-oracle-linux.sh -y
reboot

AlmaLinux

curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
bash almalinux-deploy.sh
reboot

Rocky Linux

curl -O https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh
bash migrate2rocky.sh -r
reboot

Notes

  • These tools change the distribution but not the major version. CentOS 8 becomes version 8, which is still supported; then upgrade 8 → 9 with ELevate (see "Upgrade from CentOS 6 to CentOS 7").
  • The AlmaLinux and Rocky Linux scripts start from CentOS 8. From CentOS 7, use ELevate, which changes the distribution and upgrades to version 8 in one go.
  • On CentOS 8, the repositories moved to vault.centos.org. If dnf fails before the migration, fix the repositories first (see "Resolved Error: YumRepo, All mirror URLs are not using ftp, http[s] or file").
  • On cPanel servers, use cPanel's ELevate script instead of these tools.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket