Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to rebuild the RPM DB Files to conform to the new md5sums of the files, so when the rpm is uninstalled, those files will still be removed.

I have a application that Installs with RPM, but the upgrade process doesn't use RPM's it uses patches to apply to those files, but when uninstalling using rpm -e --dbpath , the files that were patched remain. Is there anyway to rebuild the rpm db to include these new files?

share|improve this question – dmourati Feb 18 '12 at 3:39

I don't think that is possible. The update process should be done with RPM as well; otherwise, RPM will see the files as changed - though files should still be removed I would guess.

You could try using the code:

rpm --rebuilddb

But I don't know if that would fix it.

You could also try something like this to "remove" the package from the database and remove the files manually:

rpm -e --justdb

But this is probably not what you want.

share|improve this answer
Yea, I've tried the rebuilddb to no avail. – Pedlar Feb 18 '12 at 2:20

This does not solve the immediate problem at hand, however to prevent these problems in the future I would recommend a custom in house repository and rebuilding your RPMs to include these files. I did this with several packages with satisfactory results.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.