On Ubuntu/Debian you can run

apt-file list nginx-core

and you will get a list of all the files that a package will deploy when installed.

How can I achieve this in RHEL with the yum command ?

The command rpm -ql is not an option because it only works with already installed packages.

1 Answer 1


AFAIK rpm can list the content of "remote" package. You just need to use the full URL. For example:

rpm -ql https://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/x86_64/getPackage/audit-3.0-0.10.20180831git0047a6c.el8.x86_64.rpm

will list the content of audit package from Oracle Linux 8

If you install yum-utils package you can use command like:

repoquery -l audit

to get list of the files in package (even if it's not installed)

  • This is not a good solution for normal workflow. I need 3 minutes to find the repository where the package is, find its URL, construct it properly, then run the command. yum info seems to provide some information about the RPM, but not information about the files that it will deploy.
    – Subzero123
    Mar 20 at 18:04
  • @Subzero123, it depend of the target! In UNIX/Linux usually you have many ways to do particular task. See my edited answer Mar 20 at 18:15
  • 2
    I used to download packages and inspect them with rpm -qlp. repoquery -l audit works great, thanks
    – Subzero123
    Mar 20 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.