How to List Installed Packages in Ubuntu Server

In this tutorial we are going to learn how to list installed packages in Ubuntu Linux.

To list installed packages in Ubuntu, we use the dpkg command with the -l option.

sudo dpkg -l

The output will be the List of packages already installed on your Ubuntu Server or Desktop Operating System.

ubuntu list installed packages

List Installed Packages Ubuntu

You can send the output to the less command if the package list is to too long.

sudo dpkg -l | less

Filter Package List with grep Command

We can send package list to the grep command to check whether specific package is installed or not.

sudo dpkg -l | grep -i apache

As per the above example, only the packages related to the apache will be listed.

List Files associate with the package

Another useful option is -L option which helps to find files associate with a specific package.

sudo dpkg -L apache2

You need to provide the exact name of the package with the -L option.

List Files associate with the package

This is helpful when you want to find the configuration file for a package in Ubuntu Server.

We can use dpkg command to list installed packages in any version of Ubuntu Linux, including Ubuntu 16.04 and Ubuntu 12.04.

submit to reddit