RHEL 9 dnf is not downloading updates with valid subscriptions

My RHEL 9 no longer getting updates when I run dnf update. My status:

subscription-manager status  
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Matched

How do I fix this?

Try running the following commands:

sudo dnf clean all
sudo rm -rfv /var/cache/dnf
sudo update-crypto-policies --set DEFAULT
sudo reboot
sudo dnf upgrade

Does this work? If not, unregister the system and register again using your username/password for RHN. For example:

sudo subscription-manager remove --all 
sudo subscription-manager unregister 
sudo subscription-manager clean

Now attach RHEL 9 to the RHN portal again:

sudo subscription-manager register --username {RHN-USER} --auto-attach 
sudo subscription-manager register --auto-attach

Check for updates:

sudo dnf check-update
sudo dnf check-upgrade
sudo dnf update

See:

  1. You didn’t show the dnf update output.
  2. You’ve a subscription, you can just ask RH.

Nothing is displayed when I run dnf update. It just says no updates. So I checked the RHN portal; my hostnames are mismatched in RHN. So I deregistered my system from RHN and again registered using the subscription-manager command. Now it is working. At some point, the RHEL 9 server hostname was changed or config for RHN, and I didn’t pay attention.