This guide explains how to rebuild an RPM database using WHM and SSH. The RPM database may get corrupted when a crash event occurs for an RPM or YUM transaction that was updating the RPM database because incomplete or inconsistent data was written to the rpmdb. Issues with the disk, resource constraints, or early process termination could have caused the crash. A bad RPM database causes numerous issues with package management.
Software like YUM and EasyApache4 will not work either until the RPM database is operational. As a result, cPanel & WHM do a database check during update sessions and attempt to fix the database as needed. On occasion, though, you might have to do this process manually.
A) To rebuild an RPM database using WHM, follow the steps:
- Log in to WHM.
- Choose the “Software” option from the left-hand side of the screen and click on the “Rebuild RPM Database” option.
- Click on the “Proceed” button.
- If your rpm database has been corrupt, an attempt will be made to reconstruct it.
- This process could take one to thirty minutes, depending on how quickly the machine works.
B) To rebuild an RPM database using the command line:
- Log in to SSH as a root user.
- Run the below command:
Hope you understood how to rebuild an RPM database using WHM and SSH. For any difficulty, reach out to our eukhost’s support specialists.