How do I see what packages are installed on Ubuntu Linux?

I am a new Ubuntu Linux server user. My server hosted at Google cloud VM. How do I see what packages are installed on Ubuntu Linux?

Introduction: Ubuntu Linux is an open source operating system based upon the Linux kernel and GNU command line utilities. Ubuntu Linux is extremely popular among new Linux users as well as developers all around the globe. This page shows how to list all installed packages with apt command or apt-get command on Ubuntu Linux.

You need to use the apt or apt-get or dpkg command to list all installed packages on an Ubuntu Linux server from the bash shell prompt.

How do I see what packages are installed on Ubuntu Linux?

The procedure to list what packages are installed on Ubuntu:

  1. Open the terminal application or log in to the remote server using ssh (e.g. ssh user@sever-name)
  2. Run command apt list --installed to list all installed packages on Ubuntu
  3. To display a list of packages satisfying certain criteria such as show matching apache2 packages, run apt list apache

Let us see some examples,.

apt list installed packages

Let us list all software packages on Ubuntu Linux available for us:
$ apt list
How do I see what packages are installed on Ubuntu Linux
You might want to use the grep command/egrep command to filter out:
$ apt list | grep nginx
$ apt list | more
However, you may see message on screen that read as follows:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

To avoid this message use the dpkg command as follows:
$ dpkg --list | grep nginx
$ dpkg --list | more

List all installed packages only

The apt command displays both installed and packages available to install. What if you want to list currently installed software only? Fear not, pass the option to the apt command:
$ apt list --installed
Ubuntu list installed packages with apt-get

How to list or find out if a specific package installed or not

Run package policy as follows:
$ apt list -a pkgNameHere
Is sudo package installed?
$ apt list -a sudo
Is sudo package mariadb-server?
$ apt list -a mariadb-server
apt-get list installed packages on Ubuntu Linux

Ubuntu list installed packages

It is also possible to list installed packages matching given pattern. The syntax is:
dpkg -l pattern
dpkg --list pattern
apt list pattern
apt list --installed pattern

For example:
dpkg --list x*
Sample outputs:

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                           Version                      Architecture                 Description
ii  xauth                                          1:1.0.10-1                   amd64                        X authentication utility
ii  xdelta3                                        3.0.11-dfsg-1ubuntu1         amd64                        Diff utility which works with binary files
ii  xdg-user-dirs                                  0.17-1ubuntu1                amd64                        tool to manage well known user directories
un  xflr5                                          <none>                       <none>                       (no description available)
un  xfsdump                                        <none>                       <none>                       (no description available)
ii  xfsprogs                                       4.9.0+nmu1ubuntu2            amd64                        Utilities for managing the XFS filesystem
ii  xkb-data                                       2.23.1-1ubuntu1              all                          X Keyboard Extension (XKB) configuration data
un  xloadimage                                     <none>                       <none>                       (no description available)
un  xorriso                                        <none>                       <none>                       (no description available)
un  xterm                                          <none>                       <none>                       (no description available)
un  xvt                                            <none>                       <none>                       (no description available)
ii  xxd                                            2:8.0.1453-1ubuntu1          amd64                        tool to make (or reverse) a hex dump
un  xz-lzma                                        <none>                       <none>                       (no description available)
ii  xz-utils                                       5.2.2-1.3                    amd64                        XZ-format compression utilities


  • ii – Indicates that package named xauth installed.
  • un – Indicates that package not installed or in Unknown status.


You learned how to list both installed and uninstalled packages on an Ubuntu Linux server or desktop using the CLI method.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 2 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
2 comments… add one
  • Murali Jul 16, 2020 @ 11:12

    Very informative article. Easy to understand for beginners.Thanks.

  • JAS Jan 30, 2021 @ 2:49

    love this, simple & clear

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum