๐ ~1 min read
Table of contents
Symptom & Impact
dnf update hangs, reports a lock, or times out while refreshing RHEL 9 repositories.
Environment & Reproduction
Run `sudo dnf repolist` and `ps -ef | grep dnf` to confirm whether another package process is active.
Root Cause Analysis
Check plugin health with `sudo dnf list installed dnf*` and confirm release packages are intact.
Quick Triage
Review automated jobs such as `dnf-makecache.timer` using `systemctl status dnf-makecache.timer`.
Step-by-Step Diagnosis
Use `journalctl -u dnf-makecache –since -2h` and `/var/log/dnf.log` to identify lock owners and timeout points.

Solution – Primary Fix
Capture `/etc/dnf/dnf.conf` and relevant `.repo` files before changes for rollback safety.
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
Validate proxy and egress access to CDN endpoints; review active zones with `firewall-cmd –get-active-zones`.
Verification & Acceptance Criteria
If custom repo paths are used, verify labels and check denials with `ausearch -m AVC -ts recent`.
Rollback Plan
Stop stale jobs, remove stale lock files only after process verification, then run `sudo dnf clean all && sudo dnf makecache`.
Prevention & Hardening
Run `sudo dnf check-update` and confirm metadata refresh completes without lock or timeout errors.
Related Errors & Cross-Refs
Stagger patch automation and avoid overlapping package tasks in cron and systemd timers.
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
Collect `dnf -v` output, repo definitions, and `journalctl` excerpts for support triage.
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.