If I want to perform a search on an RPM package before installing it, how can this be done?

If I run yum info bind, it gives a basic overview:

[user@localhost ~]$ yum info bind
Last metadata expiration check: 0:16:53 ago on Tue 06 Sep 2022 06:07:52 PM CDT.
Available Packages
Name         : bind
Epoch        : 32
Version      : 9.16.23
Release      : 4.el9
Architecture : x86_64
Size         : 504 k
Source       : bind-9.16.23-4.el9.src.rpm
Repository   : appstream
Summary      : The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server
URL          : https://www.isc.org/downloads/bind/
License      : MPLv2.0
Description  : BIND (Berkeley Internet Name Domain) is an implementation of the DNS
             : (Domain Name System) protocols. BIND includes a DNS server (named),
             : which resolves host names to IP addresses; a resolver library
             : (routines for applications to use when interfacing with DNS); and
             : tools for verifying that the DNS server is operating properly.

We can see which dependencies will be installed with yum install bind:

[user@localhost ~]$ sudo yum install bind
Last metadata expiration check: 0:07:38 ago on Tue 06 Sep 2022 06:18:56 PM CDT.
Dependencies resolved.
 Package                                                                  Architecture                                                  Version                                                                    Repository                                                        Size
 bind                                                                     x86_64                                                        32:9.16.23-4.el9                                                           appstream                                                        504 k
Installing dependencies:
 bind-dnssec-doc                                                          noarch                                                        32:9.16.23-4.el9                                                           appstream                                                         47 k
 python3-bind                                                             noarch                                                        32:9.16.23-4.el9                                                           appstream                                                         69 k
Installing weak dependencies:
 bind-dnssec-utils                                                        x86_64                                                        32:9.16.23-4.el9                                                           appstream                                                        118 k

Transaction Summary
Install  4 Packages

However, is there a way to query which dependencies and scripts will be installed via rpm? Example: rpm -q --scripts bind.x86_64 or rpm -ql bind.x86_64

[user@localhost ~]$ rpm -ql bind.x86_64
package bind.x86_64 is not installed

1 Answer 1


One could use yumdownloader to poke at the package:

# yum -y install yum-utils
# yumdownloader bind
# rpm -qp --scripts bind*.rpm

To avoid having to install yum-utils, another option might be:

# yum --downloadonly install bind
# find /var/cache/yum -name bind\*

This has the advantage of pulling down the dependencies, if you need to inspect those as well.

  • Thank you! yum-utils was exactly what I needed to accomplish this Sep 6, 2022 at 23:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .