Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


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
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

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

Your Answer


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.