How to fix Yum error on centos 7

There are occasions when the disk i/o fails or mis behaves during a yum update. You might see the following errors.

There is a quick fix for this issue, as you would need to remove the old RPM DB and rebuild the rpm the follwoing