Product SiteDocumentation Site

4.2. Getting Information on Packages

The query options for the rpm command include a whole set of options that return information about the files that make up a package, the scripts, and other parts of the original package. The following sections cover these options.

4.2.1. Describing packages

The –i option with an rpm query command tells the rpm command to output descriptive information about the package. You can also use the longer option, --info, in place of –i. The basic syntax is:
rpm -qi package


The order of the command-line options is very important. Remember that the rpm command has the following general syntax:
rpm –MajorOperation –extra_options packages_or_files
rpm –i installs packages and rpm –q queries packages. The rpm –qi command outputs the descriptive information on packages. If you make a mistake and place the i in front of the q, you are telling the rpm command to perform a different operation.
When you run this command, being very careful with the order of the options, you’ll see output like the following, which describes the tcsh shell package.
rpm -qi tcsh-6.17-6
Name : tcsh Relocations: (not relocateable)
Version : 6.17 Vendor: Fedora Project
Release : 6 Build Date: Tue 15 Dec 2009 11:28:11 AM EST
Install Date: Fri 27 Aug 2010 07:41:03 PM EDT      Build Host: localhost
Group       : System Environment/Shells     Source RPM: tcsh-6.17-6.fc13.src.rpm
Size        : 1191282                          License: BSD
Signature   : RSA/SHA256, Fri 05 Feb 2010 09:30:43 AM EST, Key ID 7edc6ad6e8e40fde
Packager    : Fedora Project
URL         :
Summary     : An enhanced version of csh, the C shell
Description :
Tcsh is an enhanced but completely compatible version of csh, the C
shell.  Tcsh is a command language interpreter which can be used both
as an interactive login shell and as a shell script command processor.
Tcsh includes a command line editor, programmable word completion,
spelling correction, a history mechanism, job control and a C language
like syntax.
The sections on custom queries following in this chapter show how you can query for any information stored in a package header, including all of the information shown with rpm –qi, as well as any other header tag.