The first command line tool you can try to list all installed packages on your Ubuntu system is apt
. Open the terminal window and execute:
$ apt list --installed
Alternatively, the dpkg
command will list installed packages, including version number, architecture, and short package description:
$ dpkg -l | grep ^ii
The following Linux command will count all installed packages:
$ dpkg -l | grep ^ii | wc -l
1727
Note, that if you are searching for a particular package name, then use the grep
command to search for its name. For example, let’s search for a package eg. ubuntu-server
to see whether it is installed:
dpkg -l | grep ^ii | grep -i ubuntu-server
ii ubuntu-server 1.443 amd64 The Ubuntu Server system
If the above command does not produce any output it means that the ubuntu-server
package is not installed yet.