How to Fix "There Are No Enabled Repositories" on RHEL

Deepak Prasad
Tested on Red Hat Enterprise Linux 10.2
Package dnf 4.20.0
subscription-manager 1.30.12
Applies to RHEL 10, RHEL 9; Rocky Linux and AlmaLinux for custom .repo troubleshooting only
Privilege sudo or root
Scope Diagnose and fix DNF "no enabled repositories" errors on RHEL through dnf repolist, Subscription Manager registration, BaseOS/AppStream availability, disabled repositories, and offline ISO fallback. Does not cover metadata download, DNS, proxy, or SSL certificate failures.
Related guides Register RHEL with Subscription Manager
DNF command cheat sheet
Create a local offline DNF repository
YUM command cheat sheet

The error There are no enabled repositories means DNF cannot find an enabled software repository from which it can install or update packages. On RHEL, that usually points to missing registration, disabled BaseOS/AppStream repositories, RHSM content configuration, or a disabled custom .repo file.

Start with these two commands:

bash
dnf repolist

Then list every configured repository, including disabled entries:

bash
dnf repolist --all

An empty dnf repolist means no enabled repositories. Repositories that appear only with --all are configured but disabled. When no Red Hat repositories appear at all, check registration and Subscription Manager next.


Quick reference: diagnose no enabled repositories

Check Command
Show enabled repositories dnf repolist
Show enabled and disabled repositories dnf repolist --all
Show disabled repositories dnf repolist --disabled
Check RHEL registration subscription-manager identity
Check RHSM status subscription-manager status
List enabled RHSM repos subscription-manager repos --list-enabled
List all RHSM repos subscription-manager repos --list
Check custom repo files ls -l /etc/yum.repos.d/
Search enabled flags grep -R '^enabled=' /etc/yum.repos.d/
Refresh DNF metadata sudo dnf clean all && sudo dnf makecache

Start with dnf repolist and dnf repolist --all. The difference between those outputs tells you whether the problem is registration, repository availability, or a disabled repository definition.


1. Understand the "There Are No Enabled Repositories" error

When every repository is disabled, DNF reports:

output
Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

That message does not automatically mean the internet is down, DNS is broken, or Subscription Manager is corrupted. It specifically means DNF currently has no enabled repository source.

Keep this separate from a metadata download failure. In that case a repository exists and is enabled, but DNF cannot reach or validate it. Symptoms such as Could not resolve host, Failed to download metadata, or TLS certificate errors belong to connectivity troubleshooting, not this article.


2. Check enabled and disabled DNF repositories

List repositories DNF can use right now:

bash
dnf repolist
output
repo id                                   repo name
codeready-builder-for-rhel-10-x86_64-rpms Red Hat CodeReady Linux Builder for RHEL 10 x86_64 (RPMs)
rhel-10-for-x86_64-appstream-rpms         Red Hat Enterprise Linux 10 for x86_64 - AppStream (RPMs)
rhel-10-for-x86_64-baseos-rpms            Red Hat Enterprise Linux 10 for x86_64 - BaseOS (RPMs)

On a healthy registered RHEL 10 host, BaseOS and AppStream should appear here.

Show every configured repository, including disabled ones:

bash
dnf repolist --all
output
repo id                                                        repo nam status
codeready-builder-for-rhel-10-x86_64-rpms                      Red Hat  enabled
rhel-10-for-x86_64-appstream-rpms                              Red Hat  enabled
rhel-10-for-x86_64-baseos-rpms                                 Red Hat  enabled
ansible-automation-platform-2.6-for-rhel-10-x86_64-rpms        Red Hat  disabled

Read the outcomes this way:

  • Repositories in dnf repolist — DNF has at least one enabled source. If you still saw the error earlier, a repository may have been enabled since then, or another DNF configuration context triggered it.
  • Repositories only in dnf repolist --all with disabled — definitions exist but are not enabled.
  • No Red Hat repositories anywhere — check RHEL registration and Subscription Manager.

When you need only the disabled set:

bash
dnf repolist --disabled

That lists repositories configured on the host but not currently enabled.


3. Check whether the RHEL system is registered

On RHEL, CDN repositories normally come through Subscription Manager. Confirm the host identity:

bash
subscription-manager identity
output
system identity: 2967b906-fcc1-451b-ad94-6129221e37a6
name: localhost.localdomain
org name: 20654856
org ID: 20654856

A valid system identity UUID and org ID mean the host is registered to your organization.

On an unregistered host, the same command fails with a message like:

text
Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Also check overall registration state:

bash
subscription-manager status
output
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Registered

This section only determines whether the host is registered. For username/password registration, activation keys, and organization setup, see register RHEL with Subscription Manager.

subscription-manager is RHEL-specific. Rocky Linux, AlmaLinux, and other rebuilds use their own repository configuration instead of RHSM.


4. Check BaseOS and AppStream repositories

Modern RHEL normally relies on two core content repositories:

  • BaseOS — core operating-system packages
  • AppStream — additional application and runtime content

On RHEL 10 x86_64, common repository IDs include:

text
rhel-10-for-x86_64-baseos-rpms
rhel-10-for-x86_64-appstream-rpms

List repositories currently enabled through RHSM:

bash
subscription-manager repos --list-enabled
output
Repo ID:   rhel-10-for-x86_64-appstream-rpms
Repo Name: Red Hat Enterprise Linux 10 for x86_64 - AppStream (RPMs)
Enabled:   1

Repo ID:   rhel-10-for-x86_64-baseos-rpms
Repo Name: Red Hat Enterprise Linux 10 for x86_64 - BaseOS (RPMs)
Enabled:   1

Search the full RHSM repository list when you need to enable a missing repo:

bash
subscription-manager repos --list | grep -E 'Repo ID|Repo Name|Enabled'

Both BaseOS and AppStream should normally be enabled on a standard RHEL system entitled through the Customer Portal or Satellite.


5. Enable a disabled repository

RHSM-managed RHEL repository

Enable one or more Red Hat CDN repositories by ID:

bash
sudo subscription-manager repos --enable=rhel-10-for-x86_64-baseos-rpms --enable=rhel-10-for-x86_64-appstream-rpms

Then confirm DNF sees them:

bash
dnf repolist

Use subscription-manager repos --enable=REPO_ID for RHSM-managed Red Hat repositories. Do not hand-edit redhat.repo as if it were a normal custom repository file.

Custom DNF repository

For a repository you defined yourself in /etc/yum.repos.d/:

bash
sudo dnf config-manager --enable REPO_ID

You can also set enabled=1 in the .repo file:

ini
enabled=1

Custom repositories and RHSM-managed repositories follow different management paths. Leave Red Hat CDN definitions under Subscription Manager control.


6. Registered RHEL but no repositories are available

When subscription-manager identity succeeds but dnf repolist is still empty, work through the content source instead of repeating registration.

Check identity, RHSM repository visibility, and DNF's view:

bash
subscription-manager identity

List what RHSM can expose on this host:

bash
subscription-manager repos --list

Compare that with DNF's repository view:

bash
dnf repolist --all

Common causes include:

  • the host registered to the wrong organization or content source
  • an activation key that does not expose required repositories
  • a Satellite content view that does not include BaseOS or AppStream
  • repository management through RHSM disabled for the system
  • incomplete subscription or content configuration

Inspect local RHSM settings when needed:

bash
subscription-manager config --list

On Satellite-managed hosts, repository availability comes from the assigned content view, lifecycle environment, and activation key. This article does not cover content-view publishing or manifest management — verify that the host's activation configuration exposes BaseOS and AppStream.


7. Check /etc/yum.repos.d/ repository files

Custom and third-party repositories live here:

bash
ls -l /etc/yum.repos.d/
output
total 84
-rw-r--r--. 1 root root 82191 Aug  5 18:06 redhat.repo

On a registered RHEL host, redhat.repo is normally managed by Subscription Manager. Search custom settings and enabled flags:

bash
grep -R -E '^\[(.+)\]|^enabled=|^baseurl=|^mirrorlist=|^metalink=' /etc/yum.repos.d/

In a custom .repo file:

  • enabled=0 means the repository is configured but disabled
  • enabled=1 means DNF may use it

Verify the repository ID, baseurl, mirrorlist, or metalink, and that the path or URL is correct. Do not manually rewrite RHSM-generated Red Hat CDN repository definitions unless Red Hat support or your organization's runbook tells you to.


8. Create an offline RHEL repository from the installation ISO

Use this method when the RHEL host is intentionally offline and cannot reach Red Hat CDN or Satellite. It is a fallback, not the default fix for a registered online system.

Download the RHEL Binary DVD ISO from the official Red Hat download page:

Download Red Hat Enterprise Linux

Select the required RHEL release and architecture, then download the DVD ISO, not the Boot ISO. The DVD image contains the BaseOS and AppStream package repositories required for the offline repository configuration below.

A Red Hat account and appropriate subscription entitlement are required to download RHEL. A no-cost Red Hat Developer Subscription for Individuals can also provide RHEL download access for eligible development use.

Mount a full RHEL installation ISO that contains the BaseOS and AppStream directories:

bash
sudo mkdir -p /mnt/rhel
sudo mount -o loop rhel-10.2-x86_64-dvd.iso /mnt/rhel

Confirm the mount contains the package trees. A full RHEL installation ISO should include at least:

text
AppStream
BaseOS

A boot-only image does not include those directories and cannot serve as an offline package source.

Create /etc/yum.repos.d/rhel-local.repo with separate BaseOS and AppStream entries:

ini
[rhel-baseos]
name=RHEL BaseOS
baseurl=file:///mnt/rhel/BaseOS
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rhel-appstream]
name=RHEL AppStream
baseurl=file:///mnt/rhel/AppStream
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Verify DNF sees the local repositories:

bash
dnf repolist

Refresh metadata:

bash
sudo dnf makecache

The mount is temporary unless you add it to /etc/fstab or remount it after reboot.


9. Verify the repository fix

Clear stale metadata before you retest:

bash
sudo dnf clean all

Refresh the cache:

bash
sudo dnf makecache

List enabled repositories again:

bash
dnf repolist

Confirm DNF can read package data from an enabled repository:

bash
dnf info bash
output
Installed Packages
Name         : bash
Version      : 5.2.26
Release      : 6.el10
Repository   : @System
From repo    : rhel-10-for-x86_64-baseos-rpms

When dnf repolist shows BaseOS or AppStream and dnf info returns package metadata, repository access is working again.


Troubleshooting

Symptom Likely cause / next check
dnf repolist shows nothing No enabled repositories
Repositories appear only with --all Repository definitions exist but are disabled
subscription-manager identity fails RHEL host is not registered
Registered but no BaseOS/AppStream Check RHSM, Satellite, or content assignment
Custom .repo contains enabled=0 Enable the repository
/etc/yum.repos.d/ is empty No custom repository definitions; check RHSM on RHEL
ISO repository disappears after reboot ISO mount is not persistent
Repository appears but metadata cannot download Connectivity, DNS, proxy, or certificate problem — not "no enabled repositories"
subscription-manager repos --list is empty Investigate RHSM or content-source configuration
Satellite client has no repositories Check activation key, content view, and lifecycle assignment

Summary

The first commands to run are dnf repolist and dnf repolist --all. On RHEL, also check subscription-manager identity and subscription-manager repos --list-enabled.

The fix depends on what you find. A disabled repository needs to be enabled. An unregistered host needs registration. A registered host with missing repositories needs RHSM or Satellite content investigation. A disabled custom .repo file needs its configuration corrected. A deliberately offline host can use BaseOS and AppStream from the RHEL installation ISO.

Do not assume every "no enabled repositories" error requires building a local repository. Most online RHEL systems are fixed by registration, enabling BaseOS/AppStream, or turning on an existing repository definition.


References

Omer Cakmak

Linux Administrator

Highly skilled at managing Debian, Ubuntu, CentOS, Oracle Linux, and Red Hat servers. Proficient in bash scripting, Ansible, and AWX central server management, he handles server operations on OpenStack, KVM, Proxmox, and VMware.

  • Debian
  • Ubuntu
  • Linux
  • Red Hat Enterprise Linux
  • Shell Script
  • System Administration