Whether you’re an experienced system administrator or a novice learning about Linux. Managing software packages is an essential chore for each CentOS user. Must know how to list installed packages since it enables you to keep track of the applications. That is installed on your system, diagnose problems, and schedule upgrades or maintenance. Grasp the process of clearing YUM cache on CentOS and Fedora to optimize disk usage. Ensure the latest package metadata by following these precise commands for cleaning packages, headers, and metadata.

In this composition, we’ll look at Yum and RPM, two crucial techniques for listing installed packages on CentOS. We have designed VPS hosting to meet your site needs in Japan. It is addressed as Tokyo server where you will get unbeatable 1gbps port network speed.

These techniques are strong tools that give you important information. Info on the software environment of your system. Let’s get started and discover how to use their abilities. The installed software packages are frequently necessary for managing a CentOS operating system. This list can be used to duplicate a work environment on another machine. Roll out software upgrades, or rebuild an operating system. Enjoy top-tier Windows server with kernel-based virtual hosting with no risk on quality and experience high website uptime.

List Installed Packages on CentOS with Yum, RPM & Yum-Utils

Apart from this, Set up a Kubernetes cluster on CentOS 7 with this direction, covering repository setup, package installation, and configuration of firewall and SELinux for effective container management. Now coming to the topic list of installed packages on centOS let’s get into the options below:

Option 1: Use YUM to List Installed Packages

Yellowdog Updater, Modified is referred to as YUM. You may install, uninstall, update, view, or search software packages with this upgraded package manager.

To view all installed packages, run the yum command as follows:

sudo yum list installed

Use the grep command to filter the output and see if a particular package has been installed using YUM:

sudo yum list installed | grep xorg

command will display specific package installed

Using YUM, you can show information about a specific package:

yum info httpd

output display details of particular package

The complete package list can alternatively be output by YUM to a file:

sudo yum list installed > listed_packages.txt

To copy the installed packages on another system, this file can be copied:

sudo yum –y install $(cat listed_packages.txt)

All installation prompts are answered with “yes” by the -y option. The file’s contents are concatenated into the yum install command using the cat command.

Use yum –help for further details on the yum command.

Option 2: Using RPM List Installed Packages

The RedHat Package Manager is known as RPM. The majority of Red Hat-based Linux operating systems, including CentOS and Fedora, include it by default.

The following commands should be entered in a terminal window to show a list of installed packages:

sudo rpm –qa
  • -q stands for “query.”
  • The -a switch denotes all.

Enter the following command to sort packages by the installation date.

sudo rpm –qa ––last

Find a package using its name by using:

sudo rpm –qa | grep –i httpd

The Apache software’s results are returned by this command.

Enter the following to output the packages list to a file:

sudo rpm –qa > listed_packages.txt

This command stores a copy of the list in the currently open working directory as a text file with the name listed_packages.txt.

Show details about a certain package:

rpm –qi httpd
  • The query is the meaning of the -q option.
  • Info is the meaning of the -i option.

The total number of installed packages is as follows:

sudo rpm –qa | wc –l
  • A word count is produced by the wc command.
  • The number of lines is counted by the -l option.

rpm wc command counts total number of packages installed

By package name and revision number, RPM lists packages. This tool could be tougher to read if the text is wrapped. For additional options, use the rpm –help command or consult the manual.

Option 3: Using yum-utils, List Installed Packages

A software application called Yum-utils enhances the capabilities of the default YUM package management.

Enter the command to begin installing the yum-utils software package.

sudo yum –y install yum-utils

Using the repoquery command, list all installed packages:

sudo repoquery –a ––installed

The yum-utils software retrieves data from yum repositories.

The Methods of Listing Installed Packages:

  • Option 1: Use YUM to List Installed Packages
  • Option 2: Using RPM List Installed Packages
  • Option 3: Using yum-utils, List Installed Packages

Final Thought on List Installed Packages on CentOS with Yum or RPM

In the empire of CentOS, maintaining control over your software packages. Need to keep your system safe and secure. No matter if you choose Yum’s user-friendly approach or RPM’s more powerful low-level features. So being able to list installed packages is a useful ability. It gives you the power to make knowledgeable decisions about the software on your system. Ensuring that you’re constantly current, secure, and effective.

You’re taking a big step toward becoming a professional CentOS user. Becoming an administrator by understanding these package listing procedures. Continue learning about the CentOS ecosystem by doing so. Keep in mind that the information you learn today will be helpful to you as you progress with Linux.