How to Rebuild an RPM Database using WHM and SSH

February 23, 2023 / cPanel & WHM

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:

  1. Log in to WHM.
  2. Choose the “Software” option from the left-hand side of the screen and click on the “Rebuild RPM Database” option.
    Software
  3. Click on the “Proceed” button.
    rebuild RPM database>proceed
  4. If your rpm database has been corrupt, an attempt will be made to reconstruct it.
    RPM
  5. 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:

  1. Log in to SSH as a root user.
  2. Run the below command:
    /scripts/find_and_fix_rpm_issues

Hope you understood how to rebuild an RPM database using WHM and SSH. For any difficulty, reach out to our eukhost’s support specialists.

Spread the love