The default AlmaLinux repositories contain the core system, but thousands of useful tools — monitoring agents, security scanners, extra PHP modules, development libraries — live elsewhere. To enable EPEL repository on AlmaLinux 9 and unlock the built-in CRB repository is one of the first things most administrators do after installation. This guide covers what these repositories are, how to enable them safely with DNF, and how to avoid the dependency conflicts that give third-party repos a bad name.
The AlmaLinux Repository Landscape – How to Enable EPEL and CRB
- BaseOS – the core operating system, supported for the life of the release.
- AppStream – application frameworks and tools delivered as streams with their own lifecycles.
- CRB (CodeReady Linux Builder) – the RHEL-compatible “builder” repo with development libraries and extra packages that EPEL builds against. It ships with AlmaLinux but is disabled by default.
- EPEL (Extra Packages for Enterprise Linux) – a Fedora community project providing thousands of additional, well-maintained packages for RHEL-compatible systems.
Step 1: Enable CRB Repository – How to Enable EPEL and CRB
CRB is already defined on your system; you only need to switch it on:
sudo dnf install -y dnf-plugins-core sudo dnf config-manager --set-enabled crb sudo dnf repolist
The crb repo should now appear in the list. Many EPEL packages depend on CRB content, so enabling CRB first prevents a class of “nothing provides lib…” errors later.
Step 2: Enable EPEL Repository on AlmaLinux 9
EPEL is installed from a small release package published by the Fedora project:
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm sudo dnf makecache sudo dnf repolist | grep -i epel
That is all it takes to enable EPEL repository on AlmaLinux 9. You can now install the packages it provides, for example:
sudo dnf install -y htop fail2ban certbot

Step 3: Working with DNF Repositories
A few DNF commands cover daily repository management:
dnf repolist all # every known repo and its state sudo dnf config-manager --set-disabled epel # turn a repo off sudo dnf --enablerepo=epel-testing install <package> # one-off use of a disabled repo sudo dnf repoquery --repo epel <package> # which repo ships a package?
Repository definitions live in /etc/yum.repos.d/. Editing them directly works, but dnf config-manager is safer because it validates your changes.
Step 4: Avoiding Conflicts and Staying Safe
EPEL is designed not to replace BaseOS or AppStream packages, which makes it one of the safest third-party repositories. Still, good habits help:
- Protect the base: install the
dnf-plugin-versionlockor use priorities if you add other repos such as Remi for PHP, so a third-party repo cannot silently upgrade core libraries. - Install only what you need: every enabled repo widens your update surface. Enable extra repos per-package when possible.
- Check before big updates: run
sudo dnf check-updateand review what will change before applying updates on production servers. - Clean metadata after repo changes:
sudo dnf clean allfixes many stale-cache errors.
Practical Packages You Unlock
With EPEL and CRB enabled you gain access to tools referenced across this site: Fail2ban for brute-force protection (see our Fail2Ban SSH protection guide), Certbot for Let’s Encrypt certificates, htop and iotop for monitoring, and a long tail of Perl, Python and development libraries. If disk space from old logs becomes an issue while you maintain the server, our article on clearing the journal log helps you reclaim it.
Troubleshooting
“No match for argument” when installing: the package name may differ in EPEL, or the repo is not actually enabled — verify with dnf repolist. GPG key errors: reinstall the epel-release package so the correct keys land in /etc/pki/rpm-gpg/. Dependency conflicts after enabling several repos: disable the conflicting repo and install the package with an explicit --enablerepo flag, or use module streams (dnf module list) to pick the intended version. The official AlmaLinux wiki documents the repository layout for each release.
Module Streams: The Other Half of AppStream
While you manage repositories, it pays to understand DNF modules, because they decide which major version of a language or database you run. AppStream delivers several versions of software such as PHP, Node.js and PostgreSQL as streams; you select one and DNF keeps you on it:
sudo dnf module list php sudo dnf module enable php:8.1 -y sudo dnf install -y php
Only one stream of a module can be enabled at a time, and switching streams on a live system should be planned like a small upgrade: check compatibility, switch, then reinstall the module’s packages. Run sudo dnf module list --installed during audits so you always know which streams your servers follow — future-you, planning an upgrade at midnight, will be grateful for the record.
Conclusion
When you enable EPEL repository on AlmaLinux 9 together with CRB, you unlock thousands of quality packages while keeping the stability of the base system. Enable CRB first, add EPEL from the official release RPM, manage everything through DNF, and be deliberate about any further repositories — your package management stays clean and predictable.