How To List Installed Packages On Debian 12 (2024)

To review system changes or to troubleshoot any package-related issues on Debian 12 or any other Linux distribution it is necessary to list the installed Debian packages. This provides better insights into the details of the installed applications. Generally, the Debian default package installer is used for listing installed packages on Debian but there are other potential ways as well.

Table of Contents

How to List Installed Packages on Debian 12

There are primarily five ways to list packages on Debian, whereas there are two other ways as well which solemnly depend on the package manager used for the installation of packages. This guide will discuss all seven ways comprehensively.

1: Through apt

Every Linux distribution has its default package installer and likewise apt is the default app installer of Debian-based Linux systems. So the primary method for listing installed applications on Debian 12 by using the apt app installer. To list all the packages either installed or upgradable on Debian 12 you can use the list command along with apt:

apt list

How To List Installed Packages On Debian 12 (1)

Next, If you want to list all of the installed packages via apt on Debian 12 then add the installed flag with apt list command:

apt list --installed

How To List Installed Packages On Debian 12 (2)

Now to not only see the current version of any installed package through the Debian default package manager but to list all of its available versions use the a flag and the respective package name along with the apt list command:

apt list -a [Package-name]

How To List Installed Packages On Debian 12 (3)

Another way to check if the package is installed on Debian 12. Simply use the installed flag along with the package name as in the image below:

apt list [Package-name] --installed

How To List Installed Packages On Debian 12 (4)

Now if you are looking for the total number of installed packages on Debian 12 then use the below command:

apt -qq list --installed | wc -l

Here wc is the word count command and -l flag counts the number of lines whereas qq option instructs apt to operate in quiet mode thus reducing the output and showing all the essential details.

How To List Installed Packages On Debian 12 (5)

Sometimes the applications on Debian 12 are installed manually so in that case you can filter out the manually installed package on Debian by executing:

apt-mark showmanual

How To List Installed Packages On Debian 12 (6)

Further to get the total number of all the applications installed manually on the Debian then execute the below command:

apt-mark showmanual | wc -l

Note: The apt-mark showmanual command shows packages you explicitly chose to install or those essential for the system’s core functionality that isn’t automatically managed by dependencies.

Last but not least you can save the list of installed packages in a text file which you can use as a requirements.txt file. The saved file further serves the purpose of package installation in virtual environments, automated systems, and more. To save the Debian list of installed packages use the below syntax:

apt list --installed > [file-name].txt

How To List Installed Packages On Debian 12 (7)

2:Through dpkg

Debian package management (dpkg) is a tool used in Debian-based Linux distributions for installing and removing applications. So to list all the applications either installed via apt or dpkg simply use the l flag as in the command below:

sudo dpkg -l

How To List Installed Packages On Debian 12 (8)

If you need to see the list interactively use the less flag with dpkg list command:

sudo dpkg -l | less

Here, less flag allows you to view the output one screen at a time. It provides navigation options to scroll up and down through the list:

How To List Installed Packages On Debian 12 (9)

Now here as you press enter and the list will propagate. Just like the apt package manager, you can also list the details of any specific package by using its name:

sudo dpkg -l | grep [package-Name]

The grep utility filters the output of the preceding command to show only the lines that contain the specified package:

How To List Installed Packages On Debian 12 (10)

Next, to display information about a specific package installed on your Debian-based Linux system use the w flag and dpkg-query command:

sudo dpkg-query -W [package-Name]

Here the dpkg-query command is used to query the dpkg database and the -w flag tells dpkg-query to show the information about the package.

How To List Installed Packages On Debian 12 (11)

Note: The sudo dpkg -l | grep [package-Name] command lists all packages and then filters the output to show only lines containing package names. Whereas, the sudo dpkg-query -W [package-Name] command shows information about a specific package that is known to the dpkg database, whether it’s installed or not.

If you want to narrow down your search for installed packages list on Debian 12 based on their starting alphabet then in that case use the below syntax:

dpkg --list '[alphabhet]*'

How To List Installed Packages On Debian 12 (12)

Now to see the total number of packages installed using the dpkg-query then execute the below command:

sudo dpkg-query -f '${binary:Package}\n' -W | wc -l

Here,the -f ‘${binary:Package}\n’ option specifies a custom format for the output. The ${binary:Package} outputs the binary package name, and \n ensures each package name is on a new line:

How To List Installed Packages On Debian 12 (13)

To view the first 10 lines of the installed packages list in Debian you can use the head option with the dpkg listing the command:

dpkg-query -l | head

Here you will see only the first ten lines of the list:

How To List Installed Packages On Debian 12 (14)

Another way to list installed Debian packages on Debian 12 is to use the below command as well:

dpkg --get-selections | grep -w "install" | head

Here, dpkg –get-selections lists all packages along with their current selection state, which can be “install”, “hold”, “deinstall”, or “purge”. Next, grep -w “install” filters the output to only show lines where the word “install”.

How To List Installed Packages On Debian 12 (15)

This command lists all packages that are marked with the selection state “install” in the dpkg database. However, it’s important to note that this command may also list packages that are set to be installed but have not yet been processed by dpkg.

Now just like we used the apt command to save all the installed files in a text file, the same function can be achieved using the dpky command as well. For that execute the below syntax:

dpkg --get-selections | grep -w "install" | cut -f1 > [file-name.txt]

Here, the cut -f1 cuts out the first field from each line, which is the package name, discarding the selection state:

How To List Installed Packages On Debian 12 (16)

You can also get more details on the Debian list of installed packages like their status, date, and installation time. This might help you while reviewing the system changes.

zgrep " installed " /var/log/dpkg.log*

Here, zgrep command works just like grep, but it can also handle compressed files (those ending in .gz). However, you can also use the grep instead of it.

How To List Installed Packages On Debian 12 (17)

3: Through aptitude

Another method to get the list of installed Debian packages on Debian 12 is to use the aptitude package manager. It simplifies package management tasks and provides an efficient way to handle software installation and maintenance on Debian-based systems. To list the installed packages on Debian first execute the below command:

aptitude

Now here you will see a list of options, click on the Installed Packages option:

How To List Installed Packages On Debian 12 (18)

Now here you can see that packages are divided into different groups and each group has a list of certain packages installed. Now here you can click on any group to see the respective installed packages:

How To List Installed Packages On Debian 12 (19)

Alternatively, you can use the following syntax for listing the installed packages on Debian 12 using the aptitude package manager:

aptitude search '~i!~M'

Here, in the above command the ‘~i’ is a part of the search pattern that tells aptitude to look for installed packages (i stands for installed). Whereas the ‘!~M’ is a negation (!) of automatically installed packages (M stands for automatically installed). It will, in essence, list every package you have specifically installed yourself:

How To List Installed Packages On Debian 12 (20)

Further, if you want to list all the packages installed by yourself and automatically then execute:

aptitude search '~i'

How To List Installed Packages On Debian 12 (21)

Note: By default, the aptitude package manager is not installed on Debian 12 so to install use the apt package manager:

sudo apt install aptitude

4: Through dctrl-tools

The next tool you can use to dctrl tools which are specifically used in Linux to process Debian package information. These tools are particularly useful for managing and querying the database of installed packages on Debian-based Linux distributions. First, you need to install it and for that execute:

sudo apt install dctrl-tools

How To List Installed Packages On Debian 12 (22)

To list all the tools available in dtcrl tools execute:

dpkg -L dctrl-tools | grep '/usr/bin/'

How To List Installed Packages On Debian 12 (23)

Next here for a demonstration, I have used the grep-status tool to list all the installed packages on Debian:

grep-status -FStatus -sPackage -n "install ok installed"

Here, the -FStatus option tells grep-status to look specifically at the ‘Status’ field in the package database. The –sPackage option specifies that you want to show the ‘Package’ field from the records. The -n prints the names of the packages, without the field name itself. Lastly, the “install ok installed” lets the grep-status search in the ‘Status’ field. It matches packages that have been properly installed and are in good condition.

How To List Installed Packages On Debian 12 (24)

5: Through Synaptic Package Manager

The synaptic package manager is a sort of GUI version of the advanced package manager tool on Debian. So if you are not very familiar with using commands on Debian 12 then use this method to list Debian packages. Simply click on the Installed option from the left pane under the Status tab to access the installed Debian packages:

How To List Installed Packages On Debian 12 (25)

6: Through Snap

To list all the packages installed on Debian 12 via the snap package manager execute the below command:

snap list

How To List Installed Packages On Debian 12 (26)

7: Through Flatpak

To list all the packages installed on Debian 12 via the Flatpak package manager execute the below command:

flatpak list --app

How To List Installed Packages On Debian 12 (27)

Conclusion

To get the list of installed packages on Debian 12 there are seven different ways which include apt, dpkg, aptitude, dctrl-tools, synaptic package manager, snap, and Flatpak. The easy and straightforward way to list Debian-installed packages is by using apt list –installed command. If you want to see detailed information on every installed package then use sudo dpkg -l | less command. If you want to use GUI then either use the synaptic package manager or aptitude package manager.

How To List Installed Packages On Debian 12 (2024)
Top Articles
Messenger RNA Degradation in Bacterial Cells
11 CA High Schools Crack Nation's Top 100: U.S News
Craigslist Livingston Montana
Urist Mcenforcer
Body Rubs Austin Texas
Phenix Food Locker Weekly Ad
LeBron James comes out on fire, scores first 16 points for Cavaliers in Game 2 vs. Pacers
Tripadvisor Near Me
Syracuse Jr High Home Page
Cooking Fever Wiki
Meritas Health Patient Portal
Colts Snap Counts
iLuv Aud Click: Tragbarer Wi-Fi-Lautsprecher für Amazons Alexa - Portable Echo Alternative
Unlv Mid Semester Classes
History of Osceola County
Ibukunore
Craigslist Maui Garage Sale
Www.publicsurplus.com Motor Pool
Craigslist Prescott Az Free Stuff
Pecos Valley Sunland Park Menu
Which Sentence is Punctuated Correctly?
Jurassic World Exhibition Discount Code
Annapolis Md Craigslist
Primerica Shareholder Account
Prévisions météo Paris à 15 jours - 1er site météo pour l'île-de-France
JD Power's top airlines in 2024, ranked - The Points Guy
How does paysafecard work? The only guide you need
Strange World Showtimes Near Atlas Cinemas Great Lakes Stadium 16
Maybe Meant To Be Chapter 43
Craigslist West Seneca
Skip The Games Ventura
Bella Thorne Bikini Uncensored
Search All of Craigslist: A Comprehensive Guide - First Republic Craigslist
Daly City Building Division
A Comprehensive 360 Training Review (2021) — How Good Is It?
Dispensaries Open On Christmas 2022
3 Zodiac Signs Whose Wishes Come True After The Pisces Moon On September 16
Lyndie Irons And Pat Tenore
Royals Yankees Score
Wordle Feb 27 Mashable
War Room Pandemic Rumble
Keci News
Zom 100 Mbti
Craigslist Pets Charleston Wv
Bradshaw And Range Obituaries
Craiglist.nj
Uno Grade Scale
Game Like Tales Of Androgyny
2000 Fortnite Symbols
Inloggen bij AH Sam - E-Overheid
Koniec veľkorysých plánov. Prestížna LEAF Academy mení adresu, masívny kampus nepostaví
The Love Life Of Kelsey Asbille: A Comprehensive Guide To Her Relationships
Latest Posts
Article information

Author: Gov. Deandrea McKenzie

Last Updated:

Views: 5486

Rating: 4.6 / 5 (46 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Gov. Deandrea McKenzie

Birthday: 2001-01-17

Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

Phone: +813077629322

Job: Real-Estate Executive

Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.