Menu
blog.headdesk.me
blog.headdesk.me

Upgrade RockyLinux 8 to 9

Posted on 2023/03/242023/08/11

Here is how to do an in-place upgrade using dnf

Install release, repo, and gpg key

At time of writing, 9.1 is the latest. In the future, you may need to browse the rocky repo and use the latest version.

dnf install https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-release-9.1-1.11.el9.noarch.rpm https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-repos-9.1-1.11.el9.noarch.rpm https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-gpg-keys-9.1-1.11.el9.noarch.rpm

Run the upgrade

rm -rf /usr/share/redhat-logos
dnf --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync
rpm --rebuilddb
reboot

Kernel and openssl version

It’s sad to see Rocky still haven’t adopt kernel 6.x. Still, the new kernel and openssl offer performance improvements over previous versions.

[root@rock8 ~]# uname -a
Linux rock8.zoo.lo 5.14.0-162.18.1.el9_1.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Mar 1 22:02:24 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
[root@rock8 ~]# openssl version
OpenSSL 3.0.1 14 Dec 2021 (Library: OpenSSL 3.0.1 14 Dec 2021)

Reset dnf modules

If you use dnf modules, you may need to reset them.

dnf module reset httpd php mysql nginx perl virt python36 python39 container-tools llvm-toolset perl-DBD-SQLite perl-DBI perl-IO-Socket-SSL perl-libwww-perl

Remove el8 packages

Next step removes all packages from EL8. Please carefully review the package list before you run rpm -e! Leaving them on the system may cause problem for package update in the future.

[root@rock9 ~]# rpm -qa | grep \.el8 | xargs rpm -e

References

https://www.starwindsoftware.com/blog/upgrade-from-rocky-linux-8-x-to-rocky-linux-9-0

Loading

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Full text search

Recent Posts

  • Generate secure password
  • AWS Compute Savings Plans
  • AWS Zonal Shift
  • Coffee break…
  • Prevent private key from being committed to git
  • aws (14)
  • coffee (2)
  • headfi (1)
  • linux (9)
  • others (61)
  • security (2)
  • tech (41)
  • terraform (3)
  • wordpress (2)

Loading

apache aws awscli azure backup boot cloud coffee docker ec2 EL8 ElasticBeanstalk espresso featured git kernel lelit linux lvm meltdown MFA nat gateway php power proliant python rdp Redhat RHEL rpm Ryzen scp security smartarray smart switch snapshot spectre tech terraform ubuntu ubuntu upgrade vpn windows wordpress workspace

©2026 blog.headdesk.me | Powered by SuperbThemes