When trying to update the operating system, you might receive an error similar to the following …
error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 - (-30969)
error: cannot open Packages database in /var/lib/rpm
This can be fixed with the following command to remove the existing database …
rm -f /var/lib/rpm/__db*