How to Find out if package is installed in Linux

To check installed packages in linux, the command is vary depend upon your distribution. Here i’m going to find installed packages on Cent OS. This will applicable to Redhat & Federo distribution.

1) rpm & yum command to check installed packages

You can Find out the installed packages using below two methods.

a) What is YUM ?

YUM means Yellowdog Updater Modified is an open-source command-line package-management utility for Linux operating systems using the RPM Package Manager. Though yum has a command-line interface. Yum is a powerful repository management tool available in all Red Hat / CentOS / Fedora distributions. It allows you to install/update/remove common packages immediately which you want.

Syntax :# rpm -qa | grep [package-name]

b) What is RPM ?

RPM means Red Hat Package Manager is an command-line package-management utility for Linux operating systems. Rpm is available in all Red Hat / CentOS / Fedora distributions. It allows you to install/update/remove common packages immediately which you want.

Syntax :# yum list installed | grep [package-name]

2) How to check the installed packages using rpm

Here i’m going to check the pure-ftpd packages installed or not in our server using rpm. See the output below.

# rpm -qa | grep pure-ftpd
pure-ftpd-1.0.36-10.cp1136.x86_64

The above rpm output clearly shows the pure-ftpd service was installed in our server.

3) How to check the installed packages using yum

Here i’m going to check the pure-ftpd packages installed or not in our server using yum. See the output below.

# yum list installed | grep pure-ftpd
pure-ftpd.x86_64                                  1.0.36-10.cp1136     installed

The above yum output clearly shows the pure-ftpd service was installed in our server.

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...