rm -f /var/lib/rpm/__db* rpm --rebuilddb yum clean all
From: https://community.nethserver.org/t/yum-rpmdb-failed/7876