View Full Version : deleted /var/lib/rpm/Packages Help!!

14th May 2007, 10:22 PM
I know it was stupid, but by mistake I deleted /var/lib/rpm/Packages. Is it possible to generate it again? I tried rpm --rebuilddb, which created the Packages file, but with no package list in it. rpm -qa shows nothing. WHen I add new packages now, they get added to the package list, but anything that's already installed is not visible.
Is there any way out other than re-installing the whole system?

15th May 2007, 08:35 PM
Does someone has answer to this? Please!!

15th May 2007, 08:40 PM
You can't recover the database in this case, sorry.

(Apart from doing something far more involved than reinstalling, eg run a script to go through /var/log/rpmpkgs, download every package and do a rpm -i --justdb <package>)

15th May 2007, 08:50 PM
Ah cool. Will do that. Thanks.