• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to List Installed Packages on Debian

Written by Admin
apt, debian, dpkg
List Installed Packages on Debian

In this tutorial, we described how to list and filter installed packages on Debian system. It is always useful to you if you know which packages are installed on your system. You can install same packages on another system if you know how to check installed package on your current Debian system or you can re-install. This guide will help to check whether a specific package is installed, count of installed packages and check version of installed packages.

List Installed Packages#

Apt is a package manager which have command-line interface to manage packages in Debian system. You can list installed packages using apt command. For get list of installed packages on Debian, execute the following command in terminal:

sudo apt list --installed

In output it will show a list of installed packages along with the version and architecture of package as given below:

debian list installed packages with apt

Generally, packages list will be long so it would better to see list using pipe and make output less and easier to read:

sudo apt list --installed | less

If you want to find any specific package is installed or not, you can filter combine grep command along with the apt command. For example, if you want check Google Chrome is installed on your Debian system or not, then run below command:

sudo apt list --installed | grep google-chrome

List Installed Packages with dpkg-query#

You can easily check the installed package from the dpkg command database using dpkg-query command. This command is useful for who are running older Debian version. Run the below command to list all the installed packages:

sudo dpkg-query -l | less
debian list installed packages with dpkg-query

From above output you can see version, description and architecture of the packages.

Also, same as apt, you can use grep command to filter package with dpkg-query -l command:

sudo dpkg-query -l | grep google-chrome

The output should show as below:

Output
google-chrome-stable/now 75.0.3770.100-1 amd64 [installed]

Export List of Installed Packages#

You can list the installed package on your Debian system and export as a file using apt command. Execute the following command to export list of all installed packages on your Debian system:

sudo apt list --installed > installed_packages.txt

You also can export the installed packages using dpkg-query command as given below:

sudo dpkg-query -f '${binary:Package}\n' -W > installed_packages.txt

Now, you can use this exported file to install these packages to your another system. Run the below command to install those packages:

sudo xargs -a installed_packages.txt apt install

How to count number of packages installed#

You can get count number of installed packages using the below command:

dpkg --list | wc --lines

It should show output as below:

Output
2008

In above output you can see 2008 packages installed on my Debian system.

Conclusion#

You successfully learned how to list installed package and find specific installed package on your Debian system.

If you have any questions or suggestion, please leave a comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install Sublime Text 3 on Debian 9
Next Article   How to Install and Use Docker on Debian 9

Related Posts

  • How to Install WordPress with Nginx on Debian 11

    How to Install WordPress with Nginx on Debian 11

    March 22, 2023
  • How to Install and Use Docker on Debian 11

    How to Install and Use Docker on Debian 11

    March 10, 2023
  • How to Install MariaDB on Debian 11 Bullseye

    How to Install MariaDB on Debian 11 Bullseye

    March 8, 2023

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook