This tutorial will teach you how to rebuild an RPM database via WHM and the command line. When a crash event happens for an RPM or YUM transaction that was updating the RPM database, the RPM database may be corrupted because incomplete or inconsistent data was written to the rpmdb. Factors such as premature process termination, resource shortages, or disc problems, could be to blame for the crash.
Numerous package management problems arise due to a faulty RPM database. Software like EasyApache4 and YUM won’t function either until the RPM database is up and running. Because of this, cPanel & WHM do a database check during update sessions and, if necessary, try to fix the database. But occasionally you might have to carry out this procedure manually.
To rebuild an RPM database in WHM manually, follow the steps:
- Log in to WHM.
- Select the “Software” option from the left-hand side of the screen and select the “Rebuild RPM Database” option under it.
- Click on the “Proceed” button. A rebuild of your rpm database will be attempted if it has become corrupt. According to the speed of the machine, this procedure can take 1-30 minutes.
To rebuild an RPM database via the command line:
- Log in as the root user.
- Execute the following command:
This way you can rebuild an RPM database via WHM and the command line. If you liked our article then do read our other KBs also, they will surely help you a lot. And if you get stuck anywhere, you can just contact our support staff they will surely help you!