How to get list of installed packages on Ubuntu

In this article, we will see how to get list of installed packages on Ubuntu.We can get the list of all packages on Ubuntu by using apt or dpkg commands. The apt tool on Ubuntu 14.04 and above makes this very easy.

Get list of packages or Software Installed using apt command:

apt --installed list

Get particular package installed or not on Ubuntu:

The below example is used to select whether package or software containing string of “postgresql” is already installed or not.

apt --installed list | grep postgresql

How to get list of installed packages on Ubuntu

The below example is used to select whether package or software containing string of “MySQL” is already installed or not.

apt --installed list | grep mysql

Get list of packages or Software Installed using dpkg command:
This dpkg is used on older and new versions of Ubuntu Linux.

1. To get full list packages:

dpkg --get-selections | grep -v deinstall

2. To check PostgreSQL installed or not:

dpkg --get-selections | grep postgres

3. To check MySQL installed or not:

dpkg --get-selections | grep mysql

or simply use

dpkg -l