List Installed Packages on Ubuntu (dpkg, apt list)
In this article, we’ll show you how to manage installed packages on Ubuntu using the command line. We’ll go over how to list the packages you have installed and how to uninstall packages you no longer need.
Listing Installed Packages
Ubuntu provides two primary commands for listing installed packages: dpkg and apt.
dpkg -l
dpkg --get-selections
apt list --installed
You can use any of the previous commands to list installed packages on Ubuntu.
The output is a list of all installed packages on your Ubuntu system. So it’s a good idea to filter the output using the grep command to check if a specific package is installed.
dpkg -l | grep ssh
dpkg --get-selections | grep ssh
apt list --installed | grep ssh
What Next?
In the next tutorial, we’ll learn how to uninstall a package using the Ubuntu terminal.