Mailinglist Archive: opensuse (4237 mails)

< Previous Next >
Re: [SLE] Clearing rpm database
  • From: Philip Washington <phwashington@xxxxxxxxxxx>
  • Date: Tue, 03 Aug 2004 23:26:43 -0500
  • Message-id: <41106583.9010408@xxxxxxxxxxx>
Randall R Schulz wrote:


On Sunday 01 August 2004 18:13, Philip Washington wrote:

How do you clear and rebuild the rpm database on Suse 9.1?
I have been unable to install some rpm's and someone indicated that the
rpm database may be corrupt.

The online documentation is your friend. According to "man rpm", what you want is "rpm --initdb" or "rpm --rebuilddb", probably "--rebuilddb":

Excerpting from the output of "man rpm":

The general form of an rpm rebuild database command is
rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root DIRECTORY]

Use --initdb to create a new database, use --rebuilddb to rebuild the database indices from the installed package headers.

Randall Schulz

I should have asked how to I delete the current database also. I was able to do this on RH but is also
required deleting some files __db.001
then doing an rpm --rebuilddb.

I'll try it out with deleting the files, since I believe there has been a version change since the last time I did this.

< Previous Next >