Is there a way to identify an unused repository in Centos/RHEL?I have quite a few repositories installed on a Centos machine and I'm not sure which ones are actually needed and which ones aren't. Is there a good way to generate a report that uses the installed package list and identifies which repositories that are still used and which ones aren't? 
Identifying unused repositories in Yum
centos;package management;yum;repository
If you're on CentOS 6, the following command should show you which repo your installed RPMs came from:rpm -qa | xargs yum info | grep '^From repo' | sort | uniq -c | sort -rnIf you're on CentOS 5 or lower, there's no 100% definitive way to get the info you want. You're going to have to go through the currently installed RPMs and try to correlate them to the various repos you have set up. There's a few ways to correlate them:Some repos like repoforge/rpmforge and IUS but a suffix on their RPMs you can grep out with something like rpm -qa release='*rf*'Correlate the packager, buildhost, signature, or vendor to the various repos. For example, if the buildhost has 'fedoraproject.org' in it, it probably came from the EPEL repo. Or if the vendor is listed as 'RPM Fusion' then it probably came from the rpmfusion repo. Every repo is different in terms if they actually use the fields and what they put in them.The packager, buildhost, and vendor can theoretically be spoofed so depending on your security needs you might not want to depend on them but the probability someone is maliciously doing this is kind of low. The signature would be the most secure one.The repos are below. You'd query all of your rpms and sort the output with something like rpm -qa --queryformat '%{vendor}\t%{name}\n' | sortPackager - %{packager}BuildHost - %{buildhost}Signature - %{RSAHEADER:pgpsig}Vendor - %{vendor}This entry on the CentOS wiki might be of assistance.