fixing corrupted rpm database

Posted on 2003-03-11
Medium Priority
Last Modified: 2013-12-15
Anyone know how to recover from an rpm install fail? I tried to do an upgrade on a package, it failed and did a core dump, and now it appears to have corrupted the rpm database. Any kind of rpm command just hangs.

Skip Egley
Question by:egley
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

splishsplash earned 500 total points
ID: 8117097
do you have any of these files?

if so, do this:

rm -f /var/lib/rpm/__db*
rpm -vv --rebuilddb

Here's a good link at to what the --rebuilddb
option actually does:

Expert Comment

ID: 8119045
if the rpm database is corrupt beyond repair or recovery then try:

rpm --initdb

This will create a new rpm database. I advise caution before simply creating a new rpm database

Author Comment

ID: 8120990
Thank you very much, worked like a charm!

I would also like to thank the other person (sorry forgot your 'handle' and can't get back to the previous screen).

If I ever figure out how to split points, I would do that.

Skip Egley

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question