| Tested on | Red Hat Enterprise Linux 10.2 |
|---|---|
| Package | dnf 4.20.0subscription-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:
dnf repolistThen list every configured repository, including disabled entries:
dnf repolist --allAn 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:
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:
dnf repolistrepo 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:
dnf repolist --allrepo 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 disabledRead 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 --allwithdisabled— definitions exist but are not enabled. - No Red Hat repositories anywhere — check RHEL registration and Subscription Manager.
When you need only the disabled set:
dnf repolist --disabledThat 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:
subscription-manager identitysystem identity: 2967b906-fcc1-451b-ad94-6129221e37a6
name: localhost.localdomain
org name: 20654856
org ID: 20654856A 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:
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:
subscription-manager status+-------------------------------------------+
System Status Details
+-------------------------------------------+
Overall Status: RegisteredThis 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:
rhel-10-for-x86_64-baseos-rpms
rhel-10-for-x86_64-appstream-rpmsList repositories currently enabled through RHSM:
subscription-manager repos --list-enabledRepo 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: 1Search the full RHSM repository list when you need to enable a missing repo:
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:
sudo subscription-manager repos --enable=rhel-10-for-x86_64-baseos-rpms --enable=rhel-10-for-x86_64-appstream-rpmsThen confirm DNF sees them:
dnf repolistUse 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/:
sudo dnf config-manager --enable REPO_IDYou can also set enabled=1 in the .repo file:
enabled=1Custom 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:
subscription-manager identityList what RHSM can expose on this host:
subscription-manager repos --listCompare that with DNF's repository view:
dnf repolist --allCommon 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:
subscription-manager config --listOn 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:
ls -l /etc/yum.repos.d/total 84
-rw-r--r--. 1 root root 82191 Aug 5 18:06 redhat.repoOn a registered RHEL host, redhat.repo is normally managed by Subscription Manager. Search custom settings and enabled flags:
grep -R -E '^\[(.+)\]|^enabled=|^baseurl=|^mirrorlist=|^metalink=' /etc/yum.repos.d/In a custom .repo file:
enabled=0means the repository is configured but disabledenabled=1means 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:
sudo mkdir -p /mnt/rhel
sudo mount -o loop rhel-10.2-x86_64-dvd.iso /mnt/rhelConfirm the mount contains the package trees. A full RHEL installation ISO should include at least:
AppStream
BaseOSA 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:
[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-releaseVerify DNF sees the local repositories:
dnf repolistRefresh metadata:
sudo dnf makecacheThe 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:
sudo dnf clean allRefresh the cache:
sudo dnf makecacheList enabled repositories again:
dnf repolistConfirm DNF can read package data from an enabled repository:
dnf info bashInstalled Packages
Name : bash
Version : 5.2.26
Release : 6.el10
Repository : @System
From repo : rhel-10-for-x86_64-baseos-rpmsWhen 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
- Managing software with the DNF tool — Red Hat documentation for
dnf repolist, repository configuration, and package management on RHEL 10 - Registering RHEL systems — Red Hat Customer Portal registration overview
- DNF configuration reference — upstream DNF repository and plugin settings
- subscription-manager — RHSM registration and repository management commands

