List Installed Packages on Ubuntu 20/22/24 | Easy Methods

[rank_math_breadcrumb]

Share your love

In this guide, we want to show you How To List Installed Packages on Ubuntu. Sometimes you may want to know how many packages are installed on your server. Many of them are pre-installed when you do a fresh install of your operating system. 

To see what packages are installed on your Ubuntu server, follow the steps below on the Orcacore website.

Steps To List Installed Packages on Ubuntu

In this guide, you will learn to list your installed packages in different ways. For this purpose, log in to your Ubuntu server as a root or non-root user with sudo privileges and follow the steps below.

1. List Installed Packages with APT Repository

An APT repository is a collection of deb packages with metadata that is readable by the apt-* family of tools, namely, apt-get. Having an APT repository allows you to perform package installation, removal, upgrade, and other operations on individual packages or groups of packages.

You can use the apt to list your installed packages. To do this, run the command below:

apt list --installed
List Installed Packages on Ubuntu with APT

Also, you can find a specific package that is installed on your Ubuntu server by using the following command:

apt list --installed | grep <package-name>

For example, find Python 3 by using the command below:

apt list --installed | grep python3
find a specific package on Ubuntu with APT

2. List Installed Packages with dpkg-query Command

dpkg-query is a tool to show information about packages listed in the dpkg database. To list the installed packages, you can use the following command:

dpkg-query -l
display installed packages on ubuntu with dpkg-query

The above output lists the installed packages along with the versions, architecture, and a short description.

Also, you can find a specific package that is installed on your Ubuntu server by using the following command:

dpkg-query -l | grep <package>

For example, find Python 3 by using the command below:

dpkg-query -l | grep python3
find a specific package on ubuntu with dpkg-query

3. Display Recently Installed Packages

If you install many packages on your server. You can use the following command to see the recently added packages on your Ubuntu server:

grep " install " /var/log/dpkg.log

4. Display the Number of Installed Packages on Ubuntu

At this point, you can easily find out how many packages are installed on your server. To do this, run the following command:

apt list --installed | grep -v "^Listing" | wc -l
Example Output
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

629

also, you can use the dpkg-query command to get the number of installed packages:

dpkg-query -l | tail -n +6 | awk '{print $1}' | sort | uniq –c

5. List Snap Packages

Snaps are containerized software packages that are simple to create and install. To find out the installed snap packages on your Ubuntu server, run the following command:

snap list
Example Output
Name    Version        Rev    Tracking       Publisher   Notes
core20  20221027       1695   latest/stable  canonical✓  base
lxd     5.0.1-9dcf35b  23541  5.0/stable/…   canonical✓  -
snapd   2.57.5         17576  latest/stable  canonical✓  snapd

Conclusion

At this point, you have learned to List Installed Packages on Ubuntu in different ways. Listing installed packages on Ubuntu helps track software, manage dependencies, verify installations, troubleshoot issues, and maintain system security.

Hope you enjoy it. Please subscribe to us on Facebook, Instagram, and YouTube.

You may also like these articles:

How To Install MySQL on Ubuntu 22.04

Install and Configure Redis on Ubuntu 22.04

Install PyCharm in Ubuntu

Samba File Share in Ubuntu 24.04

Find Ubuntu Version and System Details

Share your love

Stay informed and not overwhelmed, subscribe now!