Migrate CentOS 7, CentOS 8 and Rocky Linux to AlmaLinux — Upgrade AlmaLinux 9 to 10
A practical migration guide covering the right tool for each path: ELevate for legacy CentOS 7 and major-version upgrades, and almalinux-deploy for supported same-major conversions from CentOS 8 and Rocky Linux.
CentOS and Rocky Linux administrators may need to move to AlmaLinux for lifecycle, support, compatibility or standardization reasons. The safe method depends on the installed operating-system version. Do not use one migration command for every scenario: converting a supported Enterprise Linux 8 system is different from upgrading CentOS 7 across several major releases.
Quick answer: which migration tool should you use?
| Starting system | Target | Recommended approach |
|---|---|---|
| CentOS Linux 7 | AlmaLinux 10 | Use the staged ELevate path: CentOS 7 → AlmaLinux 8 → AlmaLinux 9 → AlmaLinux 10. Do not attempt a direct jump. |
| CentOS Linux 8.4 or later | AlmaLinux 8 | Use the official almalinux-deploy migration tool for a same-major conversion. |
| Rocky Linux 8, 9 or 10 | Same AlmaLinux major version | Use almalinux-deploy for supported same-major conversion paths; confirm current compatibility first. |
| AlmaLinux 9 | AlmaLinux 10 | Use ELevate/Leapp, run the pre-upgrade assessment, resolve inhibitors and then perform the upgrade. |
Support paths and prerequisites can change. Check the official AlmaLinux documentation linked in the Sources section before running commands on production systems.
1. Pre-migration checklist
Complete these checks before changing repositories or replacing system packages. For remote servers, arrange out-of-band or hypervisor console access rather than relying on a fragile SSH-only session.
Backup and recovery
- Take a verified full backup or restorable VM snapshot.
- Back up application data, databases, certificates and configuration.
- Document a tested rollback or restore procedure.
System readiness
- Confirm the current release and architecture.
- Check free space, especially in
/bootand package caches. - Review third-party repositories and unsupported packages.
Access and dependencies
- Confirm root or sudo access and stable console access.
- Check application/vendor support for the target release.
- Schedule downtime and notify service owners.
After the upgrade
- Plan service, network, storage and application tests.
- Confirm monitoring, backup agents and security agents work.
- Keep logs and the pre-upgrade report for audit purposes.
Identify the installed distribution and version:
cat /etc/os-release
cat /etc/redhat-release
uname -r
df -h / /boot
2. Migrate CentOS 8 to AlmaLinux using almalinux-deploy
The AlmaLinux migration tool supports CentOS Linux 8 (minimum supported Enterprise Linux 8 version 8.4) and converts supported EL systems to AlmaLinux within the same major version. CentOS Linux 8 is end-of-life, so its standard mirrors may no longer work; consult the official migration guide for Vault/repository recovery instructions if package updates fail.
Step 1 — Update and check prerequisites
sudo dnf update -y
sudo dnf install -y dnf-plugins-core
If dnf update fails because CentOS 8 repositories are unavailable, stop and follow the repository/Vault guidance in the official AlmaLinux migration guide rather than randomly replacing repository files.
Step 2 — Download the official migration script
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
Review the script and confirm it comes from the official AlmaLinux project repository before execution. Ensure the machine has enough free disk space, GRUB2 where required, and stable console access.
Step 3 — Run the conversion
sudo bash almalinux-deploy.sh
Read the entire output. Do not reboot if the process reports unresolved errors or incomplete package transactions; investigate those messages first.
Step 4 — Reboot and verify
sudo reboot
After reconnecting, confirm the operating system and default boot entry:
cat /etc/redhat-release
sudo grubby --info DEFAULT | grep AlmaLinux
3. Migrate Rocky Linux to AlmaLinux
The official almalinux-deploy project documents support for Rocky Linux 8, 9 and 10 conversion paths. Use the same-major target unless the current official documentation explicitly confirms the path you need. For example, treat Rocky Linux 9 → AlmaLinux 9 as a same-major conversion, not as a major-version upgrade.
- Confirm the Rocky Linux major release with
cat /etc/os-release. - Check the official migration guide and script requirements for that release.
- Back up the system and verify console access, free disk space and repository health.
- Update the supported source system where appropriate and install required tooling.
- Download the script from the official project repository and inspect it.
- Run
sudo bash almalinux-deploy.shfrom a reliable console session. - Review all output, reboot only when the conversion completes successfully, then validate the release, boot entry and services.
cat /etc/os-release
sudo dnf update -y
sudo dnf install -y dnf-plugins-core
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
sudo bash almalinux-deploy.sh
sudo reboot
4. Migrate CentOS 7 to AlmaLinux using staged ELevate upgrades
CentOS 7 cannot be converted directly to AlmaLinux 10 using almalinux-deploy. The official AlmaLinux ELevate procedure separates the journey into major-version steps: CentOS 7 → AlmaLinux 8 → AlmaLinux 9 → AlmaLinux 10. Each stage has its own prerequisites, package compatibility checks, reboot and validation.
Stage A — CentOS 7 to AlmaLinux 8
- Read the official ELevate CentOS 7 migration guide in full.
- Back up the server and confirm a working console/rollback route.
- Use the documented CentOS Vault or AlmaLinux-provided repository configuration where required.
- Install the ELevate release package and the correct Leapp upgrade data according to the official guide.
- Run the pre-upgrade assessment, inspect its report and answer file, resolve blockers, perform the upgrade and reboot.
Stage B — AlmaLinux 8 to AlmaLinux 9
- Confirm Stage A completed and the machine boots cleanly into AlmaLinux 8.
- Remove or resolve legacy packages and configuration exclusions as described by the official guide.
- Run the ELevate pre-upgrade assessment for the next major version.
- Resolve inhibitors and answer required questions before initiating the upgrade.
- Upgrade, reboot, then validate system and application health before continuing.
Stage C — AlmaLinux 9 to AlmaLinux 10
Follow the AlmaLinux 9 → 10 procedure in the next section. Do not start Stage C until AlmaLinux 9 has passed your system and application checks.
Official step-by-step reference: ELevate CentOS 7 to AlmaLinux 10 guide. It includes repository handling, the correct staged path and special cases.
5. Upgrade AlmaLinux 9 to AlmaLinux 10
Use the official ELevate/Leapp upgrade workflow. A pre-upgrade report is a required planning tool: it identifies blockers and required answers, and should be reviewed before you begin the actual upgrade.
Step 1 — Update, back up and confirm support
sudo dnf update -y
sudo reboot
After reboot, confirm the system is healthy, ensure backups are restorable, review the current ELevate guide, and verify that your CPU architecture, applications and third-party repositories are supported. AlmaLinux 10 has specific CPU architecture requirements and exceptions; check the official notes for your hardware or VM CPU configuration.
Step 2 — Install ELevate and AlmaLinux upgrade data
sudo dnf install -y https://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm
sudo dnf install -y leapp-upgrade leapp-data-almalinux
Use the current official guide if the package manager rejects the repository URL or if the required package names have changed.
Step 3 — Run the pre-upgrade assessment
sudo leapp preupgrade
Review the report and answer file:
sudo less /var/log/leapp/leapp-report.txt
sudo less /var/log/leapp/answerfile
Resolve every inhibitor and follow each applicable recommendation. Some reports require an explicit answer in the answer file; do not blindly accept settings without understanding their effect. Re-run the pre-upgrade assessment after changes and check the new report.
Step 4 — Start the upgrade
sudo leapp upgrade
Follow the tool’s instructions, retain console access and allow the process to complete. Reboot when instructed. Do not interrupt the upgrade or power off the VM during package transactions.
Step 5 — Validate the upgraded system
cat /etc/redhat-release
cat /etc/os-release
uname -r
systemctl --failed
sudo grubby --info DEFAULT
Validate application services, network routes, DNS, firewall rules, storage mounts, monitoring, backup jobs and security controls. Confirm your application owners have tested their workloads before closing the change.
6. Post-migration validation checklist
- OS and boot: confirm the expected AlmaLinux release and default kernel entry.
- Package manager: run
sudo dnf checkand inspect failed transactions or repository errors. - Services: run
systemctl --failedand check key application services. - Networking: validate IP addressing, DNS resolution, routes, firewall rules and remote access.
- Storage: confirm filesystems, mount points, permissions and application data.
- Security: validate SELinux mode, security agents, certificates and access controls.
- Applications: test service health, logs, integrations, scheduled jobs and performance.
- Recovery: confirm backup jobs run successfully and document the final release/configuration.
For a fresh installation instead of an in-place migration, see our companion guide: How to Install AlmaLinux 10 Step by Step (Proxmox, VMware, VirtualBox and Hyper-V).
7. Troubleshooting common problems
DNF cannot reach CentOS 8 or CentOS 7 repositories
These releases are end-of-life. Stop and follow the repository/Vault instructions in the official AlmaLinux migration guide for your exact starting release. Avoid mixing arbitrary third-party repository files with the upgrade.
The migration script reports package or repository errors
Save the complete output, inspect enabled repositories and failed package transactions, verify free disk space and confirm that the source release is supported. Resolve the specific error before retrying; do not repeatedly rerun a partially completed conversion without understanding its state.
Leapp preupgrade reports inhibitors
Read /var/log/leapp/leapp-report.txt and the answer file. Apply only the fixes relevant to your system, rerun leapp preupgrade, and proceed only after blockers are resolved according to the official guide.
The server does not boot after migration
Use hypervisor or out-of-band console access. Review the boot entry and kernel state, and follow the recovery plan created before migration. Restore from the tested backup/snapshot if you cannot safely recover the machine.
Will applications and third-party repositories keep working?
Not automatically. Validate vendor support for the target major version, repository availability, kernel modules, agents, database compatibility and any packages that may not exist for the target release.
Frequently asked questions
Can I migrate CentOS 7 directly to AlmaLinux 10?
No. The official ELevate process requires staged upgrades: CentOS 7 to AlmaLinux 8, then AlmaLinux 9, then AlmaLinux 10. Validate each stage before proceeding.
Can almalinux-deploy upgrade CentOS 8 to AlmaLinux 9?
almalinux-deploy is for supported conversions to AlmaLinux within the same major version. Use a documented major-version upgrade workflow for a change from EL8 to EL9.
Can I convert Rocky Linux 9 to AlmaLinux 9?
The AlmaLinux migration project lists supported Rocky Linux 8, 9 and 10 conversion sources. Confirm the exact source/target combination and current prerequisites in the official migration guide before running the tool.
Is AlmaLinux 9 to 10 an ordinary DNF update?
No. It is a major-version upgrade. Use the supported ELevate/Leapp process, run the pre-upgrade assessment, review its report and answer file, and then proceed when blockers are resolved.
Should I perform these migrations directly on a production server?
Only after a tested backup, recovery plan, application compatibility review and rehearsal in a representative test environment. Schedule a maintenance window and ensure reliable console access.
Related VMoreCloud guides
- How to Install AlmaLinux 10 Step by Step (Proxmox, VMware, VirtualBox and Hyper-V) — use this if you need a clean installation rather than an in-place migration.
- Migrate CentOS to AlmaLinux: CentOS 7, 8 and Rocky Linux — companion overview of migration paths and tooling.
Official sources and further reading
- AlmaLinux Migration Guide — supported conversion paths, prerequisites and conversion steps.
- AlmaLinux/almalinux-deploy on GitHub — script requirements and usage.
- ELevate: CentOS 7 to AlmaLinux 10 — staged major-version upgrade path.
- ELevate Quickstart Guide — major-version upgrade preparation and workflow.
