What is RPM Database?
Every package you install with RPM is stored in the RPM DB. The RPM system includes commands to query this database to find out which packages are installed and also it provides a few details about these packages. The database can be stored in the directory /var/lib/rpm. It uses Berkeley DB as its back-end. Here you will see, what command is used to rebuild RPM database.
What is an RPM?
RPM Package Manager(RPM) originally stands for RedHat Package Manager. It is the most popular package management utility. An RPM package can contain some set of important files. The name RPM refers to the .rpm file formats, software package in such files and the packet manager program itself.
The following command is used to rebuild Database?
rpm -rebuilddb is used to rebuild RPM Database.
The above command rebuilds the RPM databases based on the file /var/lib/rpm/Packages. The mentioned “Packages” files are important and required in order to rebuild your RPM database without any interrupt. Before executing this command make sure that your server is working in good condition with normal above speed because this command may take some time to complete the process if your server is slow.