Score:0

Yum command to find files that an RPM will deploy

gb flag

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.

Score:3
in flag

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)

Subzero123 avatar
gb flag
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.
Romeo Ninov avatar
in flag
@Subzero123, it depend of the target! In UNIX/Linux usually you have many ways to do particular task. See my edited answer
Subzero123 avatar
gb flag
I used to download packages and inspect them with `rpm -qlp`. `repoquery -l audit` works great, thanks
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.