Basic RPM and Yum Queries

Let’s have a look at examples of how to manage software packages from the command line interface. As we run CentOS we will use yum and rpm utilities.

RPM Queries

Show packages in the rpm database:

Show packages in the rpm database:

List files in the rpm package:

List files in the rpm package:

Find rpm package given files are coming from

Find the rpm package configuration file(s):

Find the rpm package documentation files:

Query Packages in Repositories

How to query an rpm package before installing it?

Query repository:

Get info about the package:

List the package content:

Download rpm package and check scripts are included in the rpm:

Note: It is especially useful if we have the rpm package downloaded from not reliable source and we want to check what scripts would be executed when installing the package.

List files in the rpm package:

Leave a reply:

This site uses Akismet to reduce spam. Learn how your comment data is processed.