How to Migrate CentOS 7, CentOS 8 and Rocky Linux to AlmaLinux — Plus Upgrade AlmaLinux 9 to 10
A practical migration guide for Linux administrators: choose the supported path, prepare backups and console access, convert supported Enterprise Linux systems with almalinux-deploy, and perform major-version upgrades with ELevate and Leapp.
almalinux-deploy converts supported Enterprise Linux distributions to AlmaLinux on the same major version—for example, CentOS Linux 8.4+ or Rocky Linux 8/9/10 to the corresponding AlmaLinux major version. It is not the CentOS 7-to-AlmaLinux 10 upgrade method. CentOS 7 needs a staged ELevate path: CentOS 7 → AlmaLinux 8 → AlmaLinux 9 → AlmaLinux 10. Review the official guide before attempting this multi-stage path.
Choose the Right Migration Path First
Do not run a conversion script before confirming your current OS, target release, architecture, repositories, bootloader and application compatibility. The supported path determines which tool and commands to use.
Same-Major Conversion
Use almalinux-deploy for supported CentOS 8, Rocky Linux and other listed EL systems.
Major-Version Upgrade
Use ELevate/Leapp for the documented CentOS 7 and AlmaLinux 9-to-10 upgrade paths.
Protect Recovery Access
Back up, test a clone, keep a console session and resolve pre-upgrade blockers before proceeding.
1. Migration Path Decision Table
Start with the installed distribution and version. The AlmaLinux migration tool’s published support list includes CentOS Linux 8.4 and later, CentOS Stream 8/9/10, and Rocky Linux 8/9/10. CentOS 7 is not in the supported list for almalinux-deploy; use the documented ELevate route instead.
| Current system | Target | Method | Important note |
|---|---|---|---|
| CentOS Linux 8.4+ | AlmaLinux 8 | almalinux-deploy | CentOS Linux 8 is EOL; repository/Vault repair may be required first. |
| CentOS Stream 8 | AlmaLinux 8 | Check current migration-tool support and release notes | Confirm exact source version and target path. |
| Rocky Linux 8 | AlmaLinux 8 | almalinux-deploy | Same-major conversion, not an EL9/10 upgrade. |
| Rocky Linux 9 | AlmaLinux 9 | almalinux-deploy | Validate third-party repositories and application support. |
| Rocky Linux 10 | AlmaLinux 10 | almalinux-deploy | Confirm exact release and architecture in current README. |
| CentOS 7 | AlmaLinux 10 | ELevate staged upgrade | CentOS 7 → AlmaLinux 8 → AlmaLinux 9 → AlmaLinux 10. |
| AlmaLinux 9 | AlmaLinux 10 | ELevate/Leapp | Run pre-upgrade analysis and fix inhibitors first. |
2. Pre-Migration Checklist
These procedures can alter repositories, packages, boot files and the running kernel. Use them only after validating the path against official documentation for your exact source and target releases.
- Back up the system. Create a tested full backup or hypervisor snapshot. A snapshot alone may not protect external databases, mounted storage or remote services.
- Test a clone first. Rehearse the entire procedure on a cloned VM or staging server.
- Keep console access. Use IPMI, iLO, iDRAC, hypervisor console or physical access. If using SSH, run inside
tmuxorscreen. - Check disk space. Ensure free space in
/,/var,/bootand package caches. - Inventory repositories and packages. Record third-party repositories, custom RPMs, kernel modules, database versions, web stack, monitoring, backup and security agents.
- Check vendor support. Confirm applications support the target AlmaLinux release and upgrade path.
- Schedule downtime and prepare rollback. Define maintenance window and rollback criteria.
Capture the current system state
cat /etc/os-release
cat /etc/redhat-release
uname -r
uname -m
df -h
df -h /boot
lsblk
sudo dnf repolist --enabled 2>/dev/null || sudo yum repolist enabled
rpm -qa | sort > "$HOME/packages-before-migration.txt"Save this output outside the server as well. The package list is an inventory aid, not a guarantee that every third-party package will migrate successfully.
3. Migrate CentOS 8 to AlmaLinux with almalinux-deploy
The official AlmaLinux migration guide supports conversion from CentOS Linux 8.4 or later. CentOS Linux 8 has reached end of life, so normal mirror lists may no longer work; repository repair or the script’s documented CentOS 8 handling may be necessary. Do not apply old repository commands blindly to CentOS Stream or another minor release.
Update and reboot if repositories permit
sudo dnf update -y
sudo rebootReconnect through the server console after reboot and verify the system is healthy. If EOL repositories are unavailable, follow the official guide’s Vault notes or documented -f option instead of guessing repository URLs.
Download the official migration script
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.shDownload only from the official AlmaLinux GitHub repository. Review the current README and script before running it.
Run the conversion
sudo bash almalinux-deploy.shIf CentOS 8 repositories need the script’s documented repair behavior, the project documentation describes sudo bash almalinux-deploy.sh -f. Use that option only after reading the current official notes and confirming it applies to your source system.
Check output and reboot
Review the full output for errors. A successful run reports “Migration to AlmaLinux is completed.” Then reboot:
sudo rebootVerify distribution and boot entry
cat /etc/redhat-release
cat /etc/os-release
sudo grubby --info DEFAULT | grep AlmaLinuxConfirm the system reports AlmaLinux and the default boot entry points to an AlmaLinux kernel. Test networking, storage, SSH, applications, monitoring and backups.
Official procedure: AlmaLinux Migration Guide and almalinux-deploy project README.
4. Migrate Rocky Linux to AlmaLinux
The AlmaLinux migration tool lists Rocky Linux 8, 9 and 10 as supported source systems. This is a same-major conversion: Rocky Linux 9 to AlmaLinux 9, for example. Moving Rocky 8 to AlmaLinux 9 or 10 also requires a major-version upgrade plan.
Update Rocky Linux
sudo dnf update -y
sudo rebootAfter reboot, confirm system health and review any pinned package versions or third-party repositories.
Download the official script
curl -O https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.shUse a stable console or persistent SSH session such as tmux.
Run almalinux-deploy
sudo bash almalinux-deploy.shMonitor the output. If it exits with an error, investigate the reported issue instead of repeatedly rerunning it.
Reboot and validate
sudo reboot
# After logging in:
cat /etc/redhat-release
cat /etc/os-release
uname -r
sudo grubby --info DEFAULT | grep AlmaLinuxVerify the release, kernel and boot entry. Test application health, networking, firewalls, SELinux, monitoring and backup jobs.
Official references: almalinux-deploy on GitHub and the AlmaLinux Migration Guide.
5. Migrate CentOS 7 to AlmaLinux
CentOS 7 is not a direct source for the almalinux-deploy conversion flow. AlmaLinux documents a staged in-place upgrade using ELevate and Leapp. To reach AlmaLinux 10, the sequence is:
| Stage | Source → target | Method | After each stage |
|---|---|---|---|
| 1 | CentOS 7 → AlmaLinux 8 | ELevate / Leapp EL7-to-EL8 | Reboot, validate services, review leftover EL7 packages. |
| 2 | AlmaLinux 8 → AlmaLinux 9 | ELevate / Leapp EL8-to-EL9 | Resolve blockers, reboot and validate applications. |
| 3 | AlmaLinux 9 → AlmaLinux 10 | ELevate / Leapp EL9-to-EL10 | Resolve blockers, reboot and run full post-upgrade checks. |
Stage 1: prepare CentOS 7
CentOS 7 repositories are offline. The official AlmaLinux guide provides a CentOS 7 repository configuration for ELevate. Follow the current guide for your exact source system; do not substitute generic repository files or commands intended for CentOS 8.
Start with the official ELevate CentOS 7 to AlmaLinux 10 guide. It contains the EL7-to-EL8 steps and subsequent preparation notes.
Stage 2: upgrade AlmaLinux 8 to AlmaLinux 9
After Stage 1 succeeds, confirm the machine boots into AlmaLinux 8. Review the official instructions for cleaning up leftover EL7 packages and removing stale exclude= entries related to Leapp/ELevate where instructed. Install the documented packages, run pre-upgrade analysis, review the report and answer file, and resolve blockers before the upgrade.
Stage 3: upgrade AlmaLinux 9 to AlmaLinux 10
Once AlmaLinux 9 is stable, follow the official EL9-to-EL10 section in the same guide. Do not assume third-party repositories, databases, kernel modules or security agents will be compatible with AlmaLinux 10.
Why this article does not paste one universal CentOS 7 command sequence: this path is long and sensitive to repository state, package leftovers and ELevate version. The authoritative AlmaLinux guide maintains stage-specific commands and known issues; using that live procedure is safer than freezing a potentially stale command sequence into a general tutorial.
6. Upgrade AlmaLinux 9 to AlmaLinux 10
AlmaLinux documents in-place major-version upgrades using ELevate and Leapp. Success is not guaranteed simply because the source is AlmaLinux 9: review the pre-upgrade report, resolve inhibitors, and check third-party software compatibility.
Update AlmaLinux 9 and reboot
sudo dnf update -y
sudo rebootAfter reboot, verify application health and ensure no pending maintenance or repository issue remains.
Install ELevate and migration packages
Use the stable ELevate instructions for AlmaLinux 9 in the official quickstart guide. The documented package installation is:
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-almalinuxConfirm the current official guide still specifies these package names and repository URL before execution; use the guide’s current command if it differs.
Run the pre-upgrade assessment
sudo leapp preupgrade
sudo less /var/log/leapp/leapp-report.txt
sudo less /var/log/leapp/answerfileReview inhibitors, required answers and recommendations. Fix blockers and answer Leapp questions only after understanding their impact. Repeat the assessment until blockers are resolved; do not blindly accept changes.
Start the upgrade
Proceed only when pre-upgrade checks are clear and the rollback plan is ready:
sudo leapp upgradeFollow the official instructions for the resulting reboot and upgrade boot entry. Do not interrupt the process; keep console access available.
Reboot and verify AlmaLinux 10
sudo reboot
# After login:
cat /etc/os-release
cat /etc/redhat-release
uname -r
sudo dnf repolist --enabled
sudo dnf checkReview Leapp logs, inspect leftover EL9 packages, restore required repositories using supported AlmaLinux 10 versions, and test every critical application.
Official references: ELevate Quickstart Guide, CentOS 7 to AlmaLinux 10 guide and ELevate project overview.
7. Post-Migration Validation Checklist
Do not consider migration complete simply because the OS boots. Confirm distribution, kernel, repositories and workloads, then check service-specific logs.
- Confirm distribution and major version using
cat /etc/os-release. - Confirm running kernel and default boot entry.
- Check package-manager health and enabled repositories.
- Verify IP address, routing, DNS, time synchronization and firewall rules.
- Check SELinux mode and investigate denials instead of disabling SELinux as a shortcut.
- Verify SSH, user access, sudo permissions and scheduled jobs.
- Test databases, web services, application services and custom systemd units.
- Check monitoring, logging, backup agents and security tools.
- Review migration logs and packages left from the previous OS version.
- Run application smoke tests and take a new backup after successful validation.
cat /etc/os-release
uname -r
sudo dnf check
sudo systemctl --failed
sudo journalctl -p err -b --no-pagerThese are general validation commands; service names and package-manager behavior vary by release. Save the outputs and compare them with your pre-migration baseline.
8. Common Migration Problems
CentOS 8 repository errors
CentOS Linux 8 is EOL. Follow the official guide’s Vault and -f notes only when they match your source version. Do not reuse CentOS Linux 8 edits on CentOS Stream.
Migration script exits early
Read the full output; verify source version, architecture, root privileges, free disk space, repositories and GRUB2 support. Resolve the specific error before retrying.
Leapp reports inhibitors
Read /var/log/leapp/leapp-report.txt and the answer file. Fix blockers according to the official guide, then rerun preupgrade.
Third-party app stops working
Check vendor support for the target release, restore correct repository configuration and use supported target-release packages. Avoid forcing old RPMs onto the new OS.
System does not boot
Use hypervisor or out-of-band console. Inspect boot entries and logs, follow official recovery instructions or revert to tested backup. Do not remove old kernels before validation.
SSH session disconnects
Use a reliable console or persistent terminal such as tmux/screen. A dropped SSH connection does not confirm whether a package transaction succeeded.
Frequently Asked Questions
Can I migrate CentOS 7 directly to AlmaLinux 10 with almalinux-deploy?
No. CentOS 7 is not a supported direct source for the same-major conversion tool. AlmaLinux documents a staged ELevate path: CentOS 7 to AlmaLinux 8, then 8 to 9, then 9 to 10.
Does almalinux-deploy support CentOS 8?
The official tool supports CentOS Linux 8.4 and later. Because CentOS Linux 8 is end-of-life, repository configuration may need attention. Follow the official guide for your exact source release.
Can I convert Rocky Linux 9 to AlmaLinux 9?
Yes, Rocky Linux 9 is included in the tool’s published supported-system list for same-major conversion. Confirm the current README, architecture, bootloader and third-party application compatibility first.
Can almalinux-deploy upgrade Rocky Linux 8 to AlmaLinux 10?
Do not treat it as a direct major-version upgrader. The tool converts supported systems to AlmaLinux on the corresponding major version. Plan major-version upgrades separately with official supported tooling.
How do I upgrade AlmaLinux 9 to AlmaLinux 10?
Use the official ELevate/Leapp procedure: update and reboot AlmaLinux 9, install the documented migration packages, run leapp preupgrade, review and resolve the report and answer file, run leapp upgrade, reboot and validate.
Is an in-place migration risk-free?
No. Repository conflicts, third-party packages, bootloader issues and application incompatibilities can cause failures. Test on a clone, maintain backups and console access, and plan rollback.
Will my applications and data remain intact?
No general guide can guarantee every custom application, repository or configuration will work unchanged. Back up data and test the exact workload on a clone before production migration.
Where can I learn to install AlmaLinux 10 from scratch?
See our How to Install AlmaLinux 10 tutorial for a fresh installation workflow. A clean install and data migration may be preferable when the source is highly customized or its in-place path is unsupported.
Conclusion
The safest AlmaLinux migration starts by choosing the correct tool for the installed OS. Use almalinux-deploy for supported same-major conversions such as CentOS Linux 8.4+ or Rocky Linux 8/9/10 to the corresponding AlmaLinux release. Use ELevate/Leapp for documented major-version upgrade paths, including AlmaLinux 9 to 10.
CentOS 7 requires particular care because reaching AlmaLinux 10 is a multi-stage upgrade, not a one-command conversion. Follow the official stage-specific guide, back up and test the process, keep console access, resolve pre-upgrade blockers and validate applications after each reboot. If the existing system is highly customized or its path is unsupported, consider a clean AlmaLinux installation and controlled data/application migration.
Planning a Fresh AlmaLinux 10 Deployment?
Read the VMoreCloud installation tutorial before building your new server or lab VM.
Official Sources & Further Reading
- AlmaLinux Migration Guide — supported source systems, conversion steps, CentOS 8 notes and validation.
- AlmaLinux/almalinux-deploy on GitHub — current supported systems, requirements and usage.
- ELevate Project overview — supported major-version upgrade paths.
- ELevate Quickstart Guide — in-place upgrade workflow and pre-upgrade checks.
- ELevate CentOS 7 to AlmaLinux 10 guide — stage-specific process and known issues.
- VMoreCloud: How to Install AlmaLinux 10 — related fresh-install tutorial.
Technical disclaimer: Migration commands and support matrices can change. This tutorial is based on official AlmaLinux documentation available at review time, but cannot guarantee success on every customized host. Read the current official guide for your source version, target release and architecture. Test first, keep backups, and do not perform an untested in-place upgrade on production systems.
