π ~1 min read
Table of contents
Symptom & Impact
dnf cannot find packages and reports no enabled repositories despite successful registration.
Environment & Reproduction
The system is registered but BaseOS or AppStream repositories were not attached or enabled.
Root Cause Analysis
Run sudo subscription-manager status and sudo subscription-manager repos –list-enabled.
Quick Triage
Attach a valid subscription with sudo subscription-manager attach –auto if no entitlement is active.
Step-by-Step Diagnosis
Enable required channels such as rhel-9-for-x86_64-baseos-rpms and appstream-rpms.

Solution – Primary Fix
Refresh metadata using sudo dnf clean all && sudo dnf makecache before installing packages.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Confirm package visibility with sudo dnf repolist and a test query like sudo dnf info vim.
Verification & Acceptance Criteria
If wrong repos were enabled, disable them using sudo subscription-manager repos –disable=.
Rollback Plan
Bake repo enablement into provisioning scripts for consistent RHEL 9 host onboarding.
Prevention & Hardening
Track registration drift by auditing subscription-manager identity and enabled repos weekly.
Related Errors & Cross-Refs
Use Ansible redhat_subscription plus rhsm_repository tasks to enforce repository state.
Related tutorial: View the step-by-step tutorial for rhel-9.
View all rhel-9 tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Consult subscription-manager and dnf manuals for repository entitlement workflow on RHEL 9.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.