CentOS package management rollercoaster

Just a quick one liner to recover from a not so sucessfull upgrade on CentOS ...

for p in $(yum update | grep "is a duplicate"  | awk ' { print $6 }'); do rpm -e 
--nodeps --justdb  $p ; done

The package were effectively upgraded but the previous version of the package was still in the rpm database for some reason, this one liner take the duplicate (old one) and remove it's definition from the DB.

Comments