List Installed Packages on Ubuntu with apt and dpkg command

When working on a Debian/ Ubuntu System, it is important to know how to list installed packages on your Machine. So let's see how we can show installed packages in Ubuntu and Debian Linux using the Command Line Interface.

List installed packages using dpkg command.

The dpkg --get-selections command will show you the list of installed packages on your Ubuntu / Debian Linux System.

dpkg --get-selections
List installed packages on Ubuntu using dpkg command.

Output will be a long list of installed packages, so it will easier to read if we send the output to the less command.

dpkg --get-selections | less

Or we can filter the package list using the grep command to find out if a certain package is already installed on our Ubuntu Server. For example, I want to check whether the Apache web server is installed or not.

dpkg --get-selections | grep -i apache

The dpkg command will show installed packages that match the keyword “apache”.

ubuntu show installed packages

To list packages with a short description, we can use dpkg-query command with -l option.

dpkg-query -l
list packages with a short description in Ubuntu / Debian Linux

apt list installed packages

We can also use the apt command to list installed packages in Ubuntu / Debian Linux.

apt list --installed
Ubuntu apt list installed packages

Again, we can filter the output through the grep command.

apt list --installed | grep -i apache
Filter apt list packages with grep command

As you can see, I have Apache installed on My Ubuntu Server.

For the Desktop users, you can also use the Ubuntu Software Center to view a list of the installed packages on your Ubuntu Desktop.