Lorin Hochstein Lorin Hochstein - 1 year ago 68
Linux Question

How to list the contents of a package using YUM?

I know how to use rpm to list the contents of a package (

rpm -qpil package.rpm
). However, this requires knowing the location of the .rpm file on the filesystem. A more elegant solution would be to use the package manager, which in my case is YUM. How can YUM be used to achieve this?

Answer Source

There is a package called yum-utils that builds on YUM and contains a tool called repoquery that can do this.

$ repoquery --help | grep -E "list\ files" 
  -l, --list            list files in this package/group

Combined into one example:

$ repoquery -l time
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download