Run the following command:
1 |
sudo dnf upgrade --refresh |
Confirm the update with y
and Enter
to confirm. Wait for the process to finish.
The command updates the package list and performs any available upgrades. The --refresh
flag instructs dnf to refresh the package list before upgrading.
Add Rocky Linux 9 Repositories
Check the latest versions on the official Rocky Linux website:
1 2 3 4 |
REPO_URL="https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r" RELEASE_PKG="rocky-release-9.4-1.7.el9.noarch.rpm" REPOS_PKG="rocky-repos-9.4-1.7.el9.noarch.rpm" GPG_KEYS_PKG="rocky-gpg-keys-9.4-1.7.el9.noarch.rpm" |
After setting the variables, add the repositories by running:
1 |
sudo dnf install $REPO_URL/$RELEASE_PKG $REPO_URL/$REPOS_PKG $REPO_URL/$GPG_KEYS_PKG |
Remove Unnecessary Packages
1 2 |
sudo dnf -y remove rpmconf yum-utils epel-release sudo rm -rf /usr/share/redhat-logos |
Install Rocky Linux 9 Packages
1 |
sudo dnf -y --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync |
If you get an error saying GPG key failed, remove the existing one using the following syntax:
1 |
sudo rpm -e --allmatches gpg-pubkey-[REPOKEYID] |
You can find the GPG key IDs by running:
1 |
rpm -qa gpg* |
1 2 3 |
gpg-pubkey-6d745a60-60287f36 gpg-pubkey-2f86d6a1-5cf7cefb gpg-pubkey-5f11735a-5a58bcd7 |
Example:
1 2 |
sudo rpm -e --allmatches gpg-pubkey-6d745a60-60287f36 : |
Next, install the right GPG key by running:
1 |
sudo rpm --import https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-9 |
Install Rocky linux9 again.
1 |
sudo dnf -y --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync |
Rebuild RPM Database
Rebuild the RPM database:
1 |
sudo rpm --rebuilddb |
After the rebuild completes, reboot the machine, and it boots into the new Rocky Linux 9 system. Run:
1 |
sudo reboot |
If it restarts and starts, it will be completed successfully.
コメント