-   Linux - Software (
-   -   corrupt the rpmdb intentionally (

tiger2000 07-19-2017 01:33 AM

corrupt the rpmdb intentionally
Any idea how to corrupt the rpmdb intentionally?

I have tried :

1. sudo rm /var/lib/rpm/__db.00X
2. sudo echo "XXXXX" >> /var/lib/rpm__db.00X

they don't work for me...

BTW, how to verify current rpmdb is fine?? can I just run "$ rpm -qa" , if $? is 0 , then it means it's good?

rknichols 07-20-2017 12:36 PM

Those "__db" files are not the RPM database. They are just used for transaction locks, and can be safely deleted if there is no RPM operation in progress. It is all of the other files in that directory that make up the database. The primary file there is "Packages". All of the other files can be rebuilt from that one by "rpm --rebuilddb". Serious damage to the "Packages" file may be unrecoverable.

All times are GMT -5. The time now is 11:01 AM.