If the package was installed recently, you can look in /var/cache/yum.
Within that directory, there is a directory for each repo, and in that a packages directory. So, you would do something like:
find /var/cache/yum -name [package-name]*
However, cache has to be enabled in your /etc/yum.conf file:
Note that a
yum clean [packages|all] will clear out the cache directory.
If the cache directory is empty, there is an alternative way. The information that is read by
yum info [package] comes from /var/cache/yum/[repo]/primary.xml.gz
You can look through the file by entering:
gunzip -d -c /var/cache/yum/[repo]/primary.xml.gz | grep '<name>[package]'
However, on machines where
yum info [package] does not display "From repo : ", as indicated by 'theotherreceive', it is because it is not in the file primary.xml, so there will be no way to retrieve that information. Therefore, if the package is in two or more primary.xml files, you will have to determine the repo priority on you system.
rpm -qa|grep NAMEthen you can do
yum list installed|grep NAMEto find what repo the rpm is from.