EN
Debian - list installed packages
8
points
In this short article we would like to show how to list installed packages in Debian Linux using Command Line.
Quick solution:
sudo apt list --installed
There are available three popular installation approaches:
apt
command,dpkg
command,- manual instalation.
In this article we focus on apt
and dpkg
commands.
apt
command example
Note: check
/etc/apt/sources.list.d/
directory to see repositotory paths.
Type following command:
sudo apt list --installed
Output:
root@server948264:/home/nazwa1dmEa1s21D/test# sudo apt list --installed
Listing... Done
adduser/oldstable,now 3.115 all [installed]
adwaita-icon-theme/oldstable,now 3.22.0-1+deb9u1 all [installed,automatic]
ant/oldstable,oldstable,now 1.9.9-1+deb9u1 all [installed,automatic]
ant-optional/oldstable,oldstable,now 1.9.9-1+deb9u1 all [installed,automatic]
apache2/oldstable,oldstable,now 2.4.25-3+deb9u9 amd64 [installed]
apache2-bin/oldstable,oldstable,now 2.4.25-3+deb9u9 amd64 [installed,automatic]
apache2-data/oldstable,oldstable,now 2.4.25-3+deb9u9 all [installed,automatic]
apache2-dev/oldstable,oldstable,now 2.4.25-3+deb9u9 amd64 [installed]
apache2-utils/oldstable,oldstable,now 2.4.25-3+deb9u9 amd64 [installed,automatic]
apt/oldstable,oldstable,now 1.4.10 amd64 [installed]
apt-transport-https/oldstable,oldstable,now 1.4.10 amd64 [installed]
apt-utils/oldstable,oldstable,now 1.4.10 amd64 [installed]
...
Other examples:
1. displaying on scrollable list:
sudo apt list --installed | less
2. checking if package is on the installed applications list:
sudo apt list --installed | grep redmine
dpkg
command example
Type following command:
sudo dpkg-query -l
Output:
Desired=Unknown/Install/Remove/Purge/Hold
| 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 adduser 3.115 all add and remove users and groups
ii adwaita-icon-theme 3.22.0-1+deb9u1 all default icon theme of GNOME
ii ant 1.9.9-1+deb9u1 all Java based build tool like make
ii ant-optional 1.9.9-1+deb9u1 all Java based build tool like make - optional libraries
ii apache2 2.4.25-3+deb9u9 amd64 Apache HTTP Server
ii apache2-bin 2.4.25-3+deb9u9 amd64 Apache HTTP Server (modules and other binary files)
ii apache2-data 2.4.25-3+deb9u9 all Apache HTTP Server (common files)
ii apache2-dev 2.4.25-3+deb9u9 amd64 Apache HTTP Server (development headers)
ii apache2-utils 2.4.25-3+deb9u9 amd64 Apache HTTP Server (utility programs for web servers)
...
Other examples:
1. displaying on scrollable list:
sudo dpkg-query -l | less
2. checking if package is on the installed applications list:
sudo dpkg-query -l | grep redmine