How to fix the warning: “RPMDB altered outside of yum”?
As noted by arana and supported by RHEL documentation, another command (that worked in my situation) is: yum history sync It will iterate through the installed RPMs and synchronize the rpm & yumdb databases.