Enable the Rocky Linux 9 security repo (not in updateinfo)
Rocky 9's security repo ships disabled in rocky-repos 9.8. How to enable it, what it holds, and why dnf --security misses it: it has no updateinfo metadata.
Error: Unknown repo: 'security'If dnf --enablerepo=security fails like this, your repository definitions are old. The Rocky docs list a security repository for Rocky 8, 9 and 10, disabled by default, but rocky-repos from the 9.3 era did not define it. Updating rocky-repos adds /etc/yum.repos.d/rocky-security.repo.
The docs describe it as temporary hot-fixes for critical vulnerabilities with public exploits that upstream has not patched yet, versioned so that the later official package always supersedes them.
[1] Bring the repository definitions up to date. This was done in a 9.3 container:
$ rpm -q rocky-repos rocky-releaserocky-repos-9.3-1.1.el9.noarchrocky-release-9.3-1.1.el9.noarch$ sudo dnf update rocky-repos rocky-release$ rpm -q rocky-repos rocky-releaserocky-repos-9.8-1.2.el9.noarchrocky-release-9.8-1.2.el9.noarchA full dnf update brings them along as well.
[2] Confirm the repository exists and is disabled.
$ dnf -q repolist --all | grep -E "repo id|security"repo id repo name statussecurity Rocky Linux 9 - Security disabledsecurity-debuginfo Rocky Linux 9 - Security Debug disabledsecurity-source Rocky Linux 9 - Security Source disabledThe definition has enabled=0 and uses the regular RPM-GPG-KEY-Rocky-9 key:
$ sed -n "/^\[security\]/,/^$/p" /etc/yum.repos.d/rocky-security.repo[security]name=Rocky Linux $releasever - Securitymirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=security-$releasever$rltype#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/security/$basearch/os/gpgcheck=1enabled=0countme=1metadata_expire=6hgpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9[3] See what it contains before enabling it. In 2026-10 it held a single kernel build (44 packages):
$ dnf -q --disablerepo="*" --enablerepo=security list --available | awk "NR>1{print \$2}" | sort | uniq -c 44 5.14.0-687.58.1.el9_8.0.1BaseOS already had newer kernels at the same time. The hot-fix build (the .0.1 suffix) had been overtaken by later official builds, exactly as the versioning design in the docs intends:
$ dnf -q --enablerepo=security list --available kernel --showduplicates | tail -3kernel.x86_64 5.14.0-687.58.1.el9_8.0.1 securitykernel.x86_64 5.14.0-687.59.1.el9_8 baseos kernel.x86_64 5.14.0-687.60.1.el9_8 baseos [4] Enable it only for the command that needs it. When a hot-fix is announced, pull it like this:
$ sudo dnf --enablerepo=security update kernelTo keep it on, use config-manager from dnf-plugins-core; --set-disabled undoes it.
$ sudo dnf config-manager --set-enabled security$ sudo dnf config-manager --set-disabled security[5] Know that dnf updateinfo and --security updates will not catch it. The repository metadata index shows updateinfo for BaseOS but not for the security repository:
$ curl -s https://dl.rockylinux.org/pub/rocky/9/security/x86_64/os/repodata/repomd.xml | grep -o "<data type=\"[a-z_]*\""<data type="primary"<data type="filelists"<data type="other"<data type="primary_db"<data type="filelists_db"<data type="other_db"The same file for BaseOS has group, group_xz and updateinfo on top of these six. With no advisory (RLSA) data, dnf updateinfo list, dnf update --security and a security-only dnf-automatic will not select the hot-fixes. Follow the announcements and install them as in step 4.
[6] Do not confuse it with the SIG repository. Installing rocky-release-security from extras adds the Security SIG's security-common repository (disabled), not security:
$ dnf -q repolist --all | grep -i -E "security|repo id"repo id repo name statussecurity-common Rocky Linux 9 - SIG Security Common disabledsecurity-common-debug Rocky Linux 9 - SIG Security Common - Debug disabledsecurity-common-source Rocky Linux 9 - SIG Security Common - Source disabledIt contained glibc and openssh builds with a .security suffix plus hardening tools such as lkrg, passwdqc and hardened_malloc. Since it replaces core system libraries, enable it only with a clear purpose. To check whether services need a restart after updating, see dnf needs-restarting.