tags:

views:

2535

answers:

4

I know how to use rpm to list the contents of a package (rpm -qpil package.rpm). Is there any way to do this with yum?

A: 

I don't think you can list the contents of a package using yum, but if you have the .rpm file on your local system (as will most likely be the case for all installed packages), you can use the rpm command to list the contents of that package like so:

rpm -qlp /path/to/fileToList.rpm

Hope this helps!

Thomi
+1  A: 

Yum doesn't have it's own package type. Yum operates and helps manage RPMs. So, you can use yum to list the available RPMs and then run the rpm -qlp command to see the contents of that package.

Haabda
A: 

Not possible with yum, as mentioned above. All I have to add, is that you may find http://www.pbone.net helpful in regards to finding out where the hell to get $specific file from. It's an index of most rpms in existance for many different rpm based distros.

Tony Dodd
+11  A: 

Actually, there is a package called yum-utils that builds on yum, and contains a tool called repoquery that can do this:

$ repoquery -ql gstreamer
/usr/bin/gst-feedback-0.10
/usr/bin/gst-inspect-0.10
/usr/bin/gst-launch-0.10
/usr/bin/gst-typefind-0.10
/usr/bin/gst-xmlinspect-0.10
/usr/bin/gst-xmllaunch-0.10
/usr/lib/gstreamer-0.10
/usr/lib/gstreamer-0.10/libgstcoreelements.so
/usr/lib/gstreamer-0.10/libgstcoreindexers.so
/usr/lib/libgstbase-0.10.so.0
/usr/lib/libgstbase-0.10.so.0.16.0
/usr/lib/libgstcontroller-0.10.so.0
/usr/lib/libgstcontroller-0.10.so.0.16.0
/usr/lib/libgstdataprotocol-0.10.so.0
/usr/lib/libgstdataprotocol-0.10.so.0.16.0
/usr/lib/libgstnet-0.10.so.0
/usr/lib/libgstnet-0.10.so.0.16.0
/usr/lib/libgstreamer-0.10.so.0
/usr/lib/libgstreamer-0.10.so.0.16.0
/usr/share/doc/gstreamer-0.10.19
/usr/share/doc/gstreamer-0.10.19/AUTHORS
/usr/share/doc/gstreamer-0.10.19/COPYING
/usr/share/doc/gstreamer-0.10.19/NEWS
/usr/share/doc/gstreamer-0.10.19/README
/usr/share/doc/gstreamer-0.10.19/RELEASE
/usr/share/doc/gstreamer-0.10.19/TODO
/usr/share/locale/af/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/az/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/be/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/bg/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/ca/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/cs/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/da/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/de/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/en_GB/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/es/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/fi/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/fr/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/hu/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/it/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/nb/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/nl/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/pl/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/ru/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/rw/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/sk/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/sq/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/sr/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/sv/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/tr/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/uk/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/vi/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/zh_CN/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/locale/zh_TW/LC_MESSAGES/gstreamer-0.10.mo
/usr/share/man/man1/gst-feedback-0.10.1.gz
/usr/share/man/man1/gst-inspect-0.10.1.gz
/usr/share/man/man1/gst-launch-0.10.1.gz
/usr/share/man/man1/gst-typefind-0.10.1.gz
/usr/share/man/man1/gst-xmlinspect-0.10.1.gz
/usr/share/man/man1/gst-xmllaunch-0.10.1.gz
Thomas Vander Stichele