Here’s a few ways which you can use to find out the repo which installed the software package.
yum list installed | grep package_name
Or,
yum list installed | grep repo_name
For example, to look for all packages installed by EPEL repo:
yum list installed | grep epel
You can also specify the name of the package to search for instead of repo name.
The downsize of this method is that packages from other repos may also be listed if they have something that matches the string of repo been search. For example, command above returns packages from extras repo, which we installed the epel-release package, and from Software Collection repo, which has “epel” string in their release.
$ sudo yum list installed | grep epel GeoIP.x86_64 1.5.1-5.el6 @epel awstats.noarch 7.0-3.el6 @epel epel-release.noarch 6-8 @extras libmcrypt.x86_64 2.5.8-9.el6 @epel mod_fcgid.x86_64 2.3.9-1.el6 @epel php-mcrypt.x86_64 5.3.3-3.el6 @epel php55.x86_64 1.1-6.el6 @rhscl-php55-epel-6-x86_64 php55-php-cli.x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 php55-php-gd.x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 php55-php-gmp.x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 php55-php-imap.x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 5.5.6-1.el6 @remi-php55more-epel-6-x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 php55-php-odbc.x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 php55-php-pdo.x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 php55-php-pear.noarch 1:1.9.4-10.el6 @rhscl-php55-epel-6-x86_64 1.3.5-1.el6 @rhscl-php55-epel-6-x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 php55-php-xml.x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 5.5.6-13.el6 @rhscl-php55-epel-6-x86_64 php55-runtime.x86_64 1.1-6.el6 @rhscl-php55-epel-6-x86_64 proftpd.x86_64 1.3.3g-4.el6 @epel remi-php55more-epel-6-x86_64.noarch 1-2 @/remi-php55more-epel-6-x86_64.noarch rhscl-php55-epel-6-x86_64.noarch 1-2 @/rhscl-php55-epel-6-x86_64.noarch scponly.x86_64 4.8-15.el6 @epel
In addition, this method also does not work if the repo that you want to search for does not have any distinctive or unique characteristics, or does not display itself in the listing.
yumdb search from_repo repo_name
For example,
yumdb search from_repo epel
Result:
[root@server etc]# yumdb search from_repo epel Loaded plugins: fastestmirror GeoIP-1.5.1-5.el6.x86_64 from_repo = epel awstats-7.0-3.el6.noarch from_repo = epel libmcrypt-2.5.8-9.el6.x86_64 from_repo = epel mod_fcgid-2.3.9-1.el6.x86_64 from_repo = epel php-mcrypt-5.3.3-3.el6.x86_64 from_repo = epel proftpd-1.3.3g-4.el6.x86_64 from_repo = epel scponly-4.8-15.el6.x86_64 from_repo = epel
find-repos-of-install | grep package_name
Or,
find-repos-of-install | grep repo_name
To use “find-repos-of-install”, you need to have yum-utils package installed.
repoquery -a --qf "%-20{repoid} %{name}" | grep package_name
Or,
repoquery -a --qf "%-20{repoid} %{name}" | grep repo_name
Repoquery lists all packages available from enabled repositories. So you may need to spend more time to find out what you want from a long list of output. And it may also return unneeded repo or package which contains the same keyword.
To use “repoquery”, you need to have yum-utils package installed.
You May Also Interested In:
- Cannot Retrieve Metalink for Repository: EPEL
- Upgrade MySQL to MariaDB 10 (Part 1 - Install MariaDB 5.5)
- Install and Run Multiple (and Newer 5.4 or 5.5) PHP Versions…
- Upgrade MySQL to MariaDB 10 (Part 2 - Upgrade MariaDB/MySQL…
- Mail: Command Not Found in Linux (RedHat / CentOS / Debian /…
- Failed or Missing Dependency of glibc-common Error
- CentOS YUM / RPM Error: rpmts_HdrFromFdno /…
- No iptables / ip6tables Bootup Action Was Found at Webmin…