After I have installed a package by yum (with multiple repository configured), how can I found from which repository it has been installed? If I run yum info package name (or yum list package name), I can found only that the package is "installed".
|
|
With yum-utils installed, repoquery will provide the information you seek (here 'epel' being the repository).
|
|||||||||
|
|
What version of yum? On the current version if the installed package is the same version as the most recent one available then the repo it was installed from is shown.
If there is a newer package available, then it will be shown separately, with the new version showing the repo it's available from. |
|||||||||||||
|
|
Coming way to late but (at least on Fedora 15) one can use yumdb for similar queries:
And what I actually needed to list packages from given repo(s):
|
|||
|
Is that information captured anywhere? The package doesn't have that information, and yum doesn't care after it finds the package. You could probably piece it together by figuring out what repos have the package and then determine which one has priority. |
|||
|
|
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:
However, cache has to be enabled in your /etc/yum.conf file:
Note that a If the cache directory is empty, there is an alternative way. The information that is read by You can look through the file by entering:
However, on machines where |
||||
|
|
To see what installed from repo epel: (Should work under Centos 5.5) note, if you have no repo named epel, it will spit out every thing installed. repoquery --repoid=epel -a | xargs yum list installed |
|||||
|
|
Not a great solution, but I found that yum list available will show you where the most up to date version of each package is available, e.g.: yum list available | grep gstreamer
bluez-gstreamer.i386 4.30-2.fc10 updates So you could do a yum list available on your package, then compare your installed version using yum list installed, and have a good idea of which repo it came from if the versions match. |
|||
|
|
|
The easiest way is this:
More tips and tricks are available here: http://wiki.centos.org/TipsAndTricks/YumAndRPM |
|||