• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to List Installed Packages on CentOS

Written by Admin, Updated On July 17, 2019
centos, rpm, yum
List Installed Packages on CentOS

In this tutorial, we described how to list and filter installed packages on CentOS system. It is always useful to you if you know which packages are installed on your system. You can install same packages on another system if you know how to check installed package on your current CentOS system or you can re-install. This guide will help to check whether a specific package is installed, count of installed packages and check version of installed packages.

List Installed Packages#

YUM is a package manager which have command-line interface to manage packages in CentOS system. You can list installed packages using yum command. For get list of installed packages on CentOS, execute the following command in terminal:

sudo yum list installed

In output, it will show a list of installed packages along with the version and repository as given below:

centos list installed packages with yum

The packages list will be long so it would better to see list using pipe and make output less and easier to read:

sudo yum list installed | less

If you want to find any specific package is installed or not, you can filter combine grep command along with the apt command. For example, if you want check Unzip is installed on your CentOS system or not, then run below command:

sudo yum list installed | grep unzip

It will show output as below:

Output
unzip.x86_64 6.0-16.el7 installed

List Installed Packages with Rpm#

You can easily check the installed package on CentOS system using rpm command. Run the below command to list all the installed packages:

sudo rpm -qa

In CentOS, rpm only print the package names.

If you would like to list or filter any specific package then, you can use -q command. The below command will show you whether the Unzip is installed on the system or not:

sudo rpm -q unzip

If the packages is installed then, output should show as below:

Output
unzip-6.0-16.el7.x86_64

Otherwise, the command will print:

Output
package skype is not installed

Export List of Installed Packages#

You can list the installed package on your CentOS system and export as a file using rpm command. Execute the following command to export list of all installed packages on your CentOS system:

sudo rpm qa --installed > installed_packages.txt

Now, you can use cat command to pass all packages to yum for install to your another system. Run the below command to install those packages:

sudo yum -y install $(cat installed_packages.txt)

Count number of packages installed#

You can get count number of installed packages using the below command:

sudo rpm -qa | wc -l

It should show output as below:

Output
394

In above output you can see 394 packages installed on my CentOS system.

Conclusion#

You successfully learned how to list installed package and find specific installed package on your CentOS machine.

If you have any questions or suggestion, please leave a comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install Google Chrome on Ubuntu 18.04
Next Article   How to Zip Files and Directories in Linux

Related Posts

  • How to Install Php 8 on CentOS 8

    How to Install PHP 8 on CentOS 8

    January 27, 2021
  • How to Install Python 3.9 on CentOS 8

    How to Install Python 3.9 on CentOS 8

    December 31, 2020
  • How to Install GIMP 2.10 on CentOS 8

    How to Install GIMP 2.10 on CentOS 8

    December 30, 2020

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

  • How to Install SSH Keys on Ubuntu 22.04
    How to Set up SSH Keys on Ubuntu 22.04 January 7, 2023
  • How to Install Mongodb on Debian 11
    How to Install MongoDB on Debian 11 Linux January 11, 2023
  • How to Install Puppet Agent on Ubuntu 22.04
    How to Install Puppet Agent on Ubuntu 22.04 January 22, 2023
  • How to Install Python 3.11 on Debian 11
    How to Install Python on Debian 11 January 25, 2023
  • How to Change-Hostname Ubuntu 22.04
    How to Change Hostname on Ubuntu 22.04 January 19, 2023
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook