Created
April 23, 2013 02:20
-
-
Save clifferson/5440326 to your computer and use it in GitHub Desktop.
Find out what repo an rpm was installed from
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum-utils provides repoquery | |
For a single package, you can find this with | |
repoquery -i package | |
PACKAGE=ruby-enterprise | |
repoquery --qf "%{repoid}" $PACKAGE | |
Replace $PACKAGE with the name of the package you care about. | |
You can find all packages that came from a specific repository with | |
REPO=ruby-enterprise-opt | |
repoquery --repoid=$REPO -a --qf "%{name}" | sort > repo_packages | |
rpm -qa --qf "%{name}\n" | sort > installed_packages | |
comm -1 -2 repo_packages installed_packages | |
Replace $REPO with the id of the repository you care about; you can see the ids of all your enabled repositories with yum repolist. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment