List of all installed packages with apt on Ubuntu

Apt is a command line interface that allows you to perform actions such as installing new software packages, removing unnecessary software packages, updating existing software packages, searching for specific software packages, etc. on a Debian VPS as an operating system or a Debian based Linux distributions such as Ubuntu. In this tutorial, we will show you how to get a list of all installed packages from apt on Ubuntu (show all installed software on your VPS)

If you want a list of all installed packages on your CentOS VPS then check our yum tutorial.

First of all, connect to your Linux server via SSH. To get a list of installed software packages on your computer, you can use the following command:

sudo apt list --installed

The output of the command will be very similar to the following, depending on which packages are currently installed:

Listing...
acl/xenial,now 2.2.52-3 amd64 [installed]
adduser/xenial,xenial,now 3.113+nmu3ubuntu4 all [installed]
apache2/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed]
apache2-bin/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed,automatic]
apache2-data/xenial-updates,xenial-updates,xenial-security,xenial-security,now 2.4.18-2ubuntu3.1 all [installed,automatic]
apache2-doc/xenial-updates,xenial-updates,xenial-security,xenial-security,now 2.4.18-2ubuntu3.1 all [installed]
apache2-utils/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed]
apparmor/xenial-updates,now 2.10.95-0ubuntu2.5 amd64 [installed,automatic]
apt/xenial-updates,now 1.2.19 amd64 [installed]
apt-utils/xenial-updates,now 1.2.19 amd64 [installed]
...

To make it easier to read the entire output you can use the program less

sudo apt list --installed | less

You can also search for a specific package using the program grep

sudo apt list --installed | grep -i apache

The output from the above command will list all packages that include apache in their names.

apache2/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed]
apache2-bin/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed,automatic]
apache2-data/xenial-updates,xenial-updates,xenial-security,xenial-security,now 2.4.18-2ubuntu3.1 all [installed,automatic]
apache2-doc/xenial-updates,xenial-updates,xenial-security,xenial-security,now 2.4.18-2ubuntu3.1 all [installed]
apache2-utils/xenial-updates,xenial-security,now 2.4.18-2ubuntu3.1 amd64 [installed]
libapache2-mod-php/xenial,xenial,now 1:7.0+35ubuntu6 all [installed,automatic]
libapache2-mod-php7.0/xenial-updates,now 7.0.13-0ubuntu0.16.04.1 amd64 [installed,automatic]
libapache2-mod-security2/xenial,now 2.9.0-1 amd64 [installed]
libapache2-modsecurity/xenial,xenial,now 2.9.0-1 all [installed]

Apt supports templates, names and options, list of installed packages (--installed)updatable packages (--upgradeable) or all available package versions (--all-versions)

Another option that can be used to get a list of installed software packages on an Ubuntu VPS is the command dpkg

sudo dpkg -l

The output of the command will give you information such as package name, version, architecture, and a short description of the package. You can of course use the program grep again to search for a specific package.

sudo dpkg -l | grep -i apache

The output should look like below:

ii  apache2                       2.4.18-2ubuntu3.1                     amd64        Apache HTTP Server
ii  apache2-bin                   2.4.18-2ubuntu3.1                     amd64        Apache HTTP Server (modules and other binary files)
ii  apache2-data                  2.4.18-2ubuntu3.1                     all          Apache HTTP Server (common files)
ii  apache2-doc                   2.4.18-2ubuntu3.1                     all          Apache HTTP Server (on-site documentation)
ii  apache2-utils                 2.4.18-2ubuntu3.1                     amd64        Apache HTTP Server (utility programs for web servers)
rc  apache2.2-common              2.2.22-6ubuntu5.1                     amd64        Apache HTTP Server common files
ii  libapache2-mod-php            1:7.0+35ubuntu6                       all          server-side, HTML-embedded scripting language (Apache 2 module) (default)
rc  libapache2-mod-php5           5.5.9+dfsg-1ubuntu4.16                amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  libapache2-mod-php7.0         7.0.13-0ubuntu0.16.04.1               amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  libapache2-mod-security2      2.9.0-1                               amd64        Tighten web applications security for Apache
ii  libapache2-modsecurity        2.9.0-1                               all          Dummy transitional package
ii  libapr1:amd64                 1.5.2-3                               amd64        Apache Portable Runtime Library
ii  libaprutil1:amd64             1.5.4-1build1                         amd64        Apache Portable Runtime Utility Library
ii  libaprutil1-dbd-sqlite3:amd64 1.5.4-1build1                         amd64        Apache Portable Runtime Utility Library - SQLite3 Driver
ii  libaprutil1-ldap:amd64        1.5.4-1build1                         amd64        Apache Portable Runtime Utility Library - LDAP Driver

PS. If you liked this post, please share it with your friends on social networks using the buttons below or just leave a comment below. Thank you in advance.

Sidebar