Upgrading between major AlmaLinux/Rocky Linux versions (e.g. 8 to 9) is a more involved process than routine package updates — this guide covers the considerations and general approach.
Important: This Is a Higher-Risk Operation
Major version upgrades carry meaningfully more risk than routine updates — take a full backup or snapshot before proceeding (see How to Use VPS Provider Snapshots Effectively), and understand that some configurations/applications may need adjustment post-upgrade.
Consider Whether a Fresh Install Might Be Preferable
For a genuinely clean transition, provisioning a fresh VPS with the new version and migrating your application/data (rather than in-place upgrading) is often more reliable, avoiding any accumulated cruft or upgrade-path edge cases — weigh this against the convenience of in-place upgrade for your specific situation.
Step 1 — Back Up Everything First
See How to Set Up Automated VPS Backups — take a comprehensive backup, and ideally a full snapshot, before beginning; this is not optional given the operation's risk profile.
Step 2 — Update the Current Version Fully First
sudo dnf update -y
Ensure your current major version is fully up to date before attempting the major version upgrade itself.
Step 3 — Install the LEAPP Upgrade Utility
sudo dnf install leapp-upgrade -y
LEAPP is the standard tool for RHEL-family major version in-place upgrades, checking for known upgrade blockers and performing the actual transition.
Step 4 — Run the Pre-Upgrade Check
sudo leapp preupgrade
Identifies potential issues (incompatible packages, configuration that needs attention) before actually attempting the upgrade — review this output carefully; address any flagged blockers before proceeding.
Step 5 — Review the Preupgrade Report
cat /var/log/leapp/leapp-report.txt
Understand exactly what issues were flagged and their severity — some may be informational, others genuine blockers requiring resolution before upgrade can proceed.
Step 6 — Address Any Identified Blockers
Common blockers include third-party repositories that need temporary disabling, or specific packages incompatible with the target version — resolve each flagged issue before proceeding.
Step 7 — Perform the Actual Upgrade
sudo leapp upgrade
This prepares the system for upgrade and typically requires a reboot into a special upgrade environment to complete the transition.
Step 8 — Reboot to Complete the Upgrade
sudo reboot
The system boots into a temporary upgrade environment, performs the actual version transition, then reboots again into your now-upgraded system.
Step 9 — Verify the Upgrade Succeeded
cat /etc/redhat-release
Step 10 — Test Application Functionality Thoroughly
Don't assume everything works simply because the OS version upgraded successfully — systematically verify each service/application functions correctly post-upgrade, since dependency versions and configuration defaults can shift between major releases.
Step 11 — Re-enable Any Temporarily Disabled Repositories
Re-add and verify compatibility of any third-party repositories you disabled during the preupgrade process.
Common Errors
Preupgrade check reports numerous blockers — take time to genuinely resolve each, or seriously reconsider the fresh-install alternative if the number/complexity of blockers suggests significant compatibility friction with your specific configuration.
Continue Reading
- How to Use VPS Provider Snapshots Effectively
- How to Get Started with AlmaLinux/Rocky Linux on a VPS
- How to Migrate from CentOS to AlmaLinux or Rocky Linux
Browse more articles in AlmaLinux & Rocky Linux.