How to check install packages on RHEL

Here are the ways to check installed packages on RHEL (Red Hat Enterprise Linux):

  1. Using yum or dnf:
  • List all installed packages:

    yum list installed

  • Check for a specific package:c

    yum list installed | grep <package_name>

    Replace <package_name> with the name of the package you want to check.

  • Using rpm:

  • List all installed packages:

    rpm -qa

  • Check for a specific package:

    rpm -qa | grep <package_name>

    Replace <package_name> with the name of the package you want to check.

  1. Using repoquery:
  • List all installed packages:

    -a --installed

  • Check for a specific package:

    repoquery -a --installed | grep <package_name>

    Replace <package_name> with the name of the package you want to check. Note:

  • yum is the older package manager, while dnf is the newer one. RHEL 8 and later versions primarily use dnf.

  • You might need to install yum-utils or dnf-utils if repoquery is not available. Choose the method that best suits your needs and preferences.