Tuesday, July 27, 2021

rpm: Find out what files are in my rpm package

 rpm: Find out what files are in my rpm package

Use following syntax to list the files for already INSTALLED package:
rpm -ql package-name

Use following syntax to list the files for RPM package:
rpm -qlp package.rpm

Type the following command to list the files for gnupg*.rpm package file:
$ rpm -qlp rpm -qlp gnupg-1.4.5-1.i386.rpm


In this example, list files in a installed package called ksh:
$ rpm -ql ksh


See the files installed by a yum package named bash:
repoquery --list bash
repoquery -l '*bash*'

Syntax
repoquery -l {package-name-here}
repoquery -q -l {package-name-here}
repoquery -q -l --plugins {package-name-here}
repoquery -q -l --plugins *{package-name-here}*
repoquery -q -l --plugins http
repoquery -q -l --plugins ksh

here,
    -l : List files in package
    -q : For rpmquery compatibility (not needed)
    --plugins : Enable plug-ins support

List the contents of a package using yum command

1. Open the terminal bash shell and type:
$ sudo yum install yum-utils

2. See the files installed by a yum package named bash:
$ repoquery --list bash
$ repoquery -l '*bash*'



https://www.cyberciti.biz/faq/howto-list-find-files-in-rpm-package/


No comments:

Post a Comment

Git branch show detached HEAD

  Git branch show detached HEAD 1. List your branch $ git branch * (HEAD detached at f219e03)   00 2. Run re-set hard $ git reset --hard 3. ...