📖 ~1 min read
Table of contents
Symptom & Impact
After upgrade the repo files lost baseurl entries and dnf cannot resolve packages.
Environment & Reproduction
Hosts upgraded from CentOS 9 Stream or with stale centos-stream-release package.
cat /etc/os-release
uname -r
rpm -qa | grep
Root Cause Analysis
centos-stream-release replaced repo files but custom edits broke metalink.
Quick Triage
Confirm package, network, SELinux and firewall state.
dnf repolist -v
rpm -qf /etc/yum.repos.d/centos.repo
Step-by-Step Diagnosis
Drill into subscription/cs-repos state and recent journal entries to isolate the failure.
dnf --disablerepo='*' --enablerepo=baseos repolist
cat /etc/yum.repos.d/centos.repo

Solution – Primary Fix
Apply the standard remediation for subscription/cs-repos on CentOS Stream 9.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo dnf reinstall centos-stream-release
sudo dnf clean all
sudo dnf makecache

Solution – Alternative Approaches
Manually set metalink= entries from the upstream defaults.
Verification & Acceptance Criteria
Validate the fix with positive functional checks before closing.
dnf repolist enabled
dnf check-update
Rollback Plan
Revert to the previous known-good configuration if the fix regresses.
cp /root/backup/centos.repo /etc/yum.repos.d/
Prevention & Hardening
Codify the fix in configuration management and add monitoring.
Pin centos-stream-release version in kickstart.
Related Errors & Cross-Refs
EPEL and CRB repo activation issues.
Related tutorial: View the step-by-step tutorial for centos-stream-9.
View all centos-stream-9 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
CentOS Stream release notes.
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.