Yum update error “rpmdb: PANIC: fatal region error detected; run recovery”

fixrpmdb01

Executing the command yum to update the system, an error message related to rpmdb panic is shown.

rpmdb: PANIC: fatal region error detected; run recovery

This error is due to the system repository, in detail the server rpm database is corrupted and needs to be rebuilt.

fixrpmdb02

 

Procedure

To fix the problem is necessary to clean the yum cache.

# yum clean-all

Then the packages rpm database has to be cancelled and rebuilt using the commands:

# rm -f /var/lib/rpm/_db*
# rpm –rebuilddb

fixrpmdb03

Trying to perform the system update once again through the command yum.

# yum update

fixrpmdb04

During the process, the system verifies the database to check the consistency.

fixrpmdb05

If the fix succeeded,  the update process is completed installing latest releases of packages.

fixrpmdb06

The system is now fully working again and updated to guarantee maximum stability.