SUSE Support

Here When You Need Us

RPM Database Corrupt

This document (7004708) is provided subject to the disclaimer at the end of this document.


SUSE Linux Enterprise Server
SUSE Linux Enterprise Real Time
SUSE Linux Enterprise Point of Service
SUSE Linux Enterprise Desktop


When typing in rpm -qa, nothing is returned.
All rpm queries or verifications return no output.
No RPM's can be installed. 
All software installation or rug/patch updates fail.


Check the /var/lib/rpm directory.  This is where the rpm database is held.  Check to see if the Packages file exists in that directory.  Even if the file exists, run these steps in succession, trying an 'rpm -qa' after each step:
1.  rpm --rebuilddb  
2.  rpm --initdb
3.  rpm --rebuilddb
If none of the above fixes the issue, SLES keeps a backup of the RPM database.  Look at /etc/sysconfig/backup, and it describes where and how many versions of the RPM database to collect.  By default, they are held in the /var/adm/backup/rpmdb directory.  You should see a Packages-<date>.gz file(s).  Starting with the latest date, unzip the file and put it in the /var/lib/rpm directory, replacing the Packages file currently there.  Then run an rpm -qa again.  As long as the backup databases are not corrupt either, this should fix the issue.


This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7004708
  • Creation Date: 21-Oct-2009
  • Modified Date:06-Mar-2021
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Point of Service
    • SUSE Linux Enterprise Real Time
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.