[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedSeptember 7, 2023

How to List Installed Packages on CentOS.

How To List Installed Packages On CentOS.

In this tutorial, we will show you how to list and filter installed packages on CentOS. Knowing how to list installed packages on your CentOS system can be helpful in situations where you need to install the same packages on another machine or if you want to re-install your system.

 

List Installed Packages with Yum

YUM (Yellow dog Updater,) is the default CentOS package manager. It can be used to download, install, remove, query, and managing CentOS RPM software packages from the official and third-party CentOS repositories.

To list the installed packages on your CentOS system with yum, use the following command:

sudo yum list installed

It will print a list of all installed packages, including information about the versions and repository of the RPM packages.

Usually, the packages list is long, for better readability it is a good idea to pipe the output to less:

sudo yum list installed | less

To find out whether a specific package is installed, filter the output with the grep command.

For example, to find out if the unzip package is installed on the system you would run:

sudo yum list installed | grep unzip
unzip.x86_64                      6.0-24.el7_9                   @updates

 

List Installed Packages with Rpm

The rpm command with the -q option allows you to query the packages.

The following command will list of all installed packages:

sudo rpm -qa

To query (search) whether a certain package is installed pass the package name to the rpm -q command. The following command will show you whether the tmux package is installed on the system:

sudo rpm -q tmux

If the package is installed, you will see something like this:

tmux-1.8-4.el7.x86_64

Otherwise, the command will print:

package tmux2is not installed

To get more information about the queried package pass -i:

sudo rpm -qi tmux

 

Create a List of all Installed packages

To create a list of the names of all installed packages on your CentOS system and save it in a file named packages_list.txt, redirect the command output to the file:

sudo rpm -qa > packages_list.txt

To install the same packages on another server you can use the cat command to pass all packages to yum:

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

 

Count the number of installed packages

To find out how many packages are installed on your system, use the same command as before but instead of redirecting the output to a file, pipe it to the wc utility to count the lines:

sudo rpm -qa | wc -l
639

The output above shows that there are 639 packages installed.

 

Conclusion

In CentOS systems you can list installed packages using the yum list installed and rpm -qa commands.

Keep reading
How to Set or Change the Time Zone in Linux
March 7, 2023

How to Set or Change the Time Zone in Linux

How To Set Or Change The Time Zone In Linux This tutorial covers the steps necessary to set or change the time zone in Linux. A time zone is a geographic region that has the same standard time. Typically the time zone is set during the installation of the operational system, but it can be…

Read article
How to Start, Stop, or Restart Nginx
March 6, 2023

How to Start, Stop, or Restart Nginx

How To Start, Stop, Or Restart Nginx This guide explains how to start, stop, and restart Nginx on Linux servers. Nginx pronounced “engine x” is a free, open-source, high-performance HTTP and reverse proxy server responsible for handling the load of some of the largest sites on the Internet. It can…

Read article
How to understand network IP (internet protocol)
March 6, 2023

How to understand network IP (internet protocol)

WHAT IS AN IP NETWORK? An IP network is a group of computers connected via their unique internet protocol (IP) addresses. IP is fundamental to allowing our devices to communicate with each other. It is the IP address that acts as the identifier and differentiates each individual device connected…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00