How to Find Package Details in Redhat, CentOS, Fedora Linux

How to Find Package Details in Redhat, CentOS, Fedora Linux

Sometimes you may need to find package details in Redhat, CentOS, Fedora Linux. This is true especially for system administrators who need to understand system package information before upgrading or deleting them. Here are some ways to get package details in RHEL, CentOS & Fedora Linux.

How to Find Package Details in Redhat, CentOS, Fedora Linux

It is very easy to get package information in Redhat, CentOS, Fedora Linux with the yum info command. Replace the package_name below with the name of the package whose information you want.

# yum info package_name

Here is a sample output of the yum info command.

# yum info abrt
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
INFO:rhsm-app.repolib:repos updated: 0
Installed Packages
Name       : abrt
Arch       : x86_64
Version    : 1.0.7
Release    : 5.el6
Size       : 578 k
Repo       : installed
From repo  : rhel
Summary    : Automatic bug detection and reporting tool
URL        :
License    : GPLv2+
Description: abrt is a tool to help users to detect defects in applications
           : and to create a bug report with all informations needed by
           : maintainer to fix it. It uses plugin system to extend its
           : functionality.

You may also get package information using rpm command as shown below.

# rpm -q --info package_name

The main difference between yum info and rpm command’s output are that with yum info, you get more information such as the ID of yum repository where the RPM package is present.

Alternatively, you can also query yum database to get package information. Here is the command for it.

# yumdb info package_name

yumdb command gives additional information such as the package checksum for verification, checksum algorithm, command used for installation, whether it was installed by user or as a dependency.

There are many third party tools to get the package information but these built-in commands are easy to use and do not require any installation or setup.

List Files in Package

Please note, the above commands will give details only about the package as a whole. They will not list the individual files present in a package. For that, you need to use the following command. Replace package_name with the name of the package whose files you want to view.

# repoquery --list package_name

Please note, on some systems, you may need to install yum-utils to be able to use repoquery. It is present in most RHEL/CentOS/Fedora systems.

# yum update && yum install yum-utils

List Installed Packages

If you want to list all installed packages, you can use yum command as shown below

# yum -qa

You can also use rpm command for this purpose.

# rpm -qa

The main difference between yum and rpm is that yum’s output also includes the repo from which the package was installed.

If you have installed yum-utils above, then you can also use repoquery to list package contents.

# repoquery -a --installed 

That’s it. In this short article, we have learnt different ways to list package details, and list files in a package.

Also read:

How to Delete Objects in Django
How to Delete File or Folder in Django
How to Disable Django Error Emails
How to Add Minutes, Hours & Months in PostgreSQL
Find Files With Special Characters in Filename in Linux

Leave a Reply

Your email address will not be published. Required fields are marked *