Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 62 packages from RPMfusion that have overridden the CentOS upstream packages, and now I would like to return to the original CentOS packages.

The only idea I can think of is

BAD_PACKAGES="name1 name2 ..."
echo $BAD_PACKAGES |xargs rpm -e --nodeps
echo $BAD_PACKAGES |xargs yum install

But that would leave the system in a broken state during the process.

Question

What is the safest way to have those packages removed and then reinstalled from CentOS's repo?

share|improve this question
    
If they are dependent packages, have you tried yum remove <package>? –  Chida Aug 26 '12 at 16:12
    
yum will try to resolve it by removing all packages that depend and not just the 62 packages. –  Sandra Aug 26 '12 at 16:33
    
Yes if those 62 packages belong to a group, you can do yum remove >group>. What are these 62 packages? –  Chida Aug 26 '12 at 17:31
add comment

2 Answers

up vote 3 down vote accepted

You can upgrade to older version by using --oldpackage option of rpm:

rpm -Uvh --oldpackage package-a.1.23.rpm

This is much safer than rpm -e --nodeps. You can upgrade several packages in one command so there will be no broken dependencies.

share|improve this answer
add comment

This following worked, but it was scary as it broke tons of critical services during the process.

rpm -qa --queryformat "%{NAME}.%{ARCH} %-35{DISTRIBUTION}\n" | grep -i "rpm-fusion" | awk '{print $1}' > /root/list_arch
cat /root/list_arch | xargs rpm -e --nodeps 
cat /root/list_arch | xargs yum -y install

list_arch had to be edited a bit as the package names from rpm-fusion was a little different from the original CentOS package names.

I had the output from the yum command that installed the rpm-fusion packages which was a big insurance.

share|improve this answer
add comment

Your Answer

 
discard

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.