Linux – How to know from which yum repository a package has been installed

linuxpackage-managementrepositoryyum

After I have installed a package by yum (with multiple repositories configured), how can I find from which repository it has been installed?

If I run yum info package-name (or yum list package-name), I can only see that the package is "installed".

Best Answer

With yum-utils installed, repoquery will provide the information you seek (here 'epel' being the repository).

$ repoquery -i cherokee

Name        : cherokee
Version     : 0.99.49
Release     : 1.el5
Architecture: i386
Size        : 8495964
Packager    : Fedora Project
Group       : Applications/Internet
URL         : http://www.cherokee-project.com/
Repository  : epel
Summary     : Flexible and Fast Webserver
Description :
Cherokee is a very fast, flexible and easy to configure Web Server. It supports
the widespread technologies nowadays: FastCGI, SCGI, PHP, CGI, TLS and SSL
encrypted connections, Virtual hosts, Authentication, on the fly encoding,
Apache compatible log files, and much more.