search
top

Fix Corrupt Yum Database

Recently ran across an issue when  running yum update that threw a db3 error similar to this:

rpmdb: Thread/process 16539/140090604701600 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

To correct this you need to remove the _db file and rebuild the db.

Looks terrible but really not so bad to correct. Open a terminal session and as root or sudo execute the following commands.

$ sudo rm -f /var/lib/rpm/__db*
$ sudo rpm --rebuilddb

Now just run sudo yum update and errors will be gone.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

top