Morten P.D. Stevens
2010-Sep-17  11:06 UTC
[CentOS] Remove all packages from specific repository
Hi CentOS Mailinglist, we are using amavisd-new (with all dependencies) from Fedora/Redhat EPEL repo. Some packages from EPEL repo are very old. (amavisd-new, clamav, spamassassin) What's the best way to remove all amavisd-new packages (and it's dependencies) from EPEL repo and reinstall it from rpmforge repo? Thank you. Best regards, Morten
Phil Schaffner
2010-Sep-17  13:19 UTC
[CentOS] Remove all packages from specific repository
Morten P.D. Stevens wrote on 09/17/2010 07:06 AM:
  > What's the best way to remove all amavisd-new packages (and it's 
dependencies) from EPEL repo and reinstall it from rpmforge repo?
To see what repos you have installed packages from:
[code]
rpm -qa --qf "%{VENDOR} \n" | sort | uniq
[/code]
The result should be a list of VENDOR tags.  To see the packages from a 
particular Vendor, for example EPEL:[code]
rpm -qa --qf "%{NAME} %{VENDOR} \n" | grep "Fedora Project"
| cut -d ' '
-f 1 | sort
[/code]
The result should be a list of EPEL packages.
Remove all, or all related to the packages you want to remove, then 
disable EPEL, or set it to a lower priority than RPMforge. Enable 
RPMforge, and install the packages you want.
If the RPMforge packages are all later versions, then the prior removal 
should not be necessary. A simple "yum update" with the correct repo 
configuration should be sufficient.
Phil