List Installed Packages In CentOS, RHEL, Fedora

RPM-based Linux distributions like CentOS, RHEL, Fedora use the yum package manager in order to update, list, install and remove packages. Alternatively, the new command dnf is also adopted for these Linux distributions for package management. If we want to list installed packages in CentOS, RHEL or Fedora we can use yum or dnf commands.

List Installed Packages with yum Command

The yum command is the most popular way to manage packages in RPM based distributions. “yum list installed can be used to list all installed packages in CentOS, RHEL, Fedora.

yum list installed

The installed package list provides following information about the installed packages.

  • Package Official Name
  • Package Version
  • Package Repository

Also installed package names can be filtered by using the “yum list installed” command. In the following example, we filter the packages whose names contain “ssh” and also installed currently.

yum list installed "*ssh*"

By default alot of packages are installed. The output of the installed packages takes a lot of pages to list. The installed packages output can be managed and viewed page by page using the more or less commands.

yum list installed | less

List Installed Packages with dnf Command

The dnf command is new version of the yum command and used with the same parameters and options. We can use the “dnf list installed” command in order to list installed packages in the CentOS, RHEL, Fedora.

dnf list installed

List Installed Packages with rpm Command

The RPM packages are managed with the rpm command. The rpm command can be also used to list installed packages. The –qa options are provided into the rpm command like below.

rpm -qa
List Installed Packages with rpm Command

From the output we can see that only the installed package names are provided.

Filter Installed Packages According To Names

The installed packages can be filtered according to the package names by using the grep command. Just provide the package names or some part of the name which is filtered in the installed packages.

rpm -qa | grep "ssh"
openssh-server-8.0p1-5.el8.x86_64
qemu-kvm-block-ssh-4.2.0-34.module_el8.3.0+613+9ec9f184.1.x86_64
openssh-askpass-8.0p1-5.el8.x86_64
openssh-clients-8.0p1-5.el8.x86_64
libssh-0.9.4-2.el8.x86_64
libssh-config-0.9.4-2.el8.noarch
openssh-8.0p1-5.el8.x86_64

Leave a Comment