How to View All the Installed Packages on Ubuntu
-
View All the Installed Packages Using the
apt
Command -
View All the Installed Packages Using
dpkg-query
- Count Number of Installed Packages in the Ubuntu System:
Sometimes, we need to use a particular package, but we are not sure whether the package exists in our system or not. Hence we need to check if the package is already installed. We can list all the installed packages on the Ubuntu system using the apt
and dpkg
commands.
View All the Installed Packages Using the apt
Command
apt
is a popular package management command-line interface introduced in Ubuntu 14.04. It can list all the installed packages in Ubuntu.
List All the Installed Packages
sudo apt list --installed
Output:
Listing... Done
accountsservice/bionic,now 0.6.45-1ubuntu1 amd64 [installed,automatic]
acl/bionic,now 2.2.52-3build1 amd64 [installed,automatic]
acpi-support/bionic,now 0.142 amd64 [installed,automatic]
acpid/bionic,now 1:2.0.28-1ubuntu1 amd64 [installed,automatic]
adduser/bionic,bionic,now 3.116ubuntu1 all [installed,automatic]
adium-theme-ubuntu/bionic,bionic,now 0.3.4-0ubuntu4 all [installed,automatic]
adwaita-icon-theme/bionic,bionic,now 3.28.0-1ubuntu1 all [installed,automatic]
cntd.......
It generates a long list of all the installed packages on our Ubuntu System, including the additional information about the version and architecture of packages.
List less
Installed Packages
The command sudo apt list --installed
generates a long list of all the installed packages. If we wish to pipe the output to less
to make it easier to read, we can use the following command:
sudo apt list --installed | less
Check if a Particular Package Is Installed
We can check whether a particular package is installed or not by adding the grep
command.
sudo apt list --installed | grep zoom
Output:
zoom/now 5.0.413237.0524 amd64 [installed,local]
It shows the zoom
package installed on our Ubuntu system and the installed version of the zoom
package 5.0.413237.0524
.
View All the Installed Packages Using dpkg-query
apt
package was introduced only after Ubuntu 14.04. If we want to list the installed packages in older Ubuntu versions, we can use dpkg-query
to list all the packages.
sudo dpkg-query -l
This command lists all the installed packages in our Ubuntu system and their version, architecture, and description.
List less
Installed Packages
The command sudo dpkg-query -l
outputs a long list of all the installed packages. If we wish to pipe the output to less
to make it easier to read, we can use the following command:
sudo dpkg-query -l| less
Check if a Particular Package Is Installed
We can check whether a particular package is installed or not using the grep
command.
sudo dpkg-query -l | grep zoom
Output:
ii zoom 5.0.413237.0524 amd64 Zoom, #1 Video Conferencing and Web Conferencing Service
It shows the zoom
package installed on our Ubuntu system and the installed version of the zoom
package 5.0.413237.0524
and a short description of the package.
Count Number of Installed Packages in the Ubuntu System:
sudo dpkg-query -f '${binary:Package}\n' -W | wc -l
Output:
2008
It shows we have 2008
packages installed in our system now.
Suraj Joshi is a backend software engineer at Matrice.ai.
LinkedIn