Hi there,
Does anyone know a quick way in yum or rpm to reinstall all currently installed rpm's - ie: Some files have been deleted but you don't know which ones.. So you just want to force a reinstall of all currently installed.
I have been using:
Rpm -Va | grep missing >> missing.log
And then more missing.log
Rpm -q -whatprovides /path/to/file
And then
Rpm -Uvh --force ftp://mirror/path/file
But it's a slow and painful process. It's on a CentOS 4.4 machine.
JC
Justin Cataldo wrote:
Hi there,
Does anyone know a quick way in yum or rpm to reinstall all currently installed rpm's - ie: Some files have been deleted but you don't know which ones.. So you just want to force a reinstall of all currently installed.
I have been using:
Rpm -Va | grep missing >> missing.log
And then more missing.log
Rpm -q -whatprovides /path/to/file
And then
Rpm -Uvh --force ftp://mirror/path/file
But it's a slow and painful process. It's on a CentOS 4.4 machine.
rpm -qa | while read p ; do yum <whatever> $p ; done rpm -qa | xargs yum <whatever>
Replace <whatever> with whatever it takes to force yum to reinstall.
Once you get it started, go have a good long nap:-)
Then, inspect all your config file:-)
rpm -qa | while read p ; do yum <whatever> $p ; done rpm -qa | xargs yum <whatever>
Replace <whatever> with whatever it takes to force yum to reinstall.
Once you get it started, go have a good long nap:-)
It probably wont work, because there's a ton of *-devel packages that need to be installed when rebuilding, which are probably not on the system right now.
If you always have your user home dirs on a seperate partition/disk, it's no big deal to reinstall. Just make sure you don't accidentally overwrite the user disk :-)
-- Morten
Justin Cataldo spake the following on 3/13/2007 7:56 PM:
Hi there,
Does anyone know a quick way in yum or rpm to reinstall all currently installed rpm's - ie: Some files have been deleted but you don't know which ones.. So you just want to force a reinstall of all currently installed.
I have been using:
Rpm -Va | grep missing >> missing.log
And then more missing.log
Rpm -q -whatprovides /path/to/file
And then
Rpm -Uvh --force ftp://mirror/path/file
But it's a slow and painful process. It's on a CentOS 4.4 machine.
JC
Personally, if a system is that hosed, I would go with the backup-reinstall-restore route. But I am a masochist. ;-P