Debian List Installed

6 min read Oct 08, 2024
Debian List Installed

How to List Installed Packages on Debian

Debian, a popular Linux distribution, comes with a comprehensive package management system known as apt. This system allows you to easily install, update, and remove software packages. But how do you know what packages are already installed on your Debian system?

This guide will walk you through various methods to list installed packages on your Debian machine. Let's dive in!

Using dpkg

dpkg is a low-level package management tool that is part of the Debian system. You can use it to list installed packages in a simple format.

Here's how:

  1. Open a terminal window.
  2. Type the following command and press Enter:
dpkg -l

This will display a detailed list of all packages installed on your system. The output will include the package name, version, architecture, status (installed, uninstalled, etc.), and a description.

Here's an example of the output:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Uninst/Half-inst/Trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required/(Status,Err:*)
---------------------------------------------------------------
ii  a2ps                          7.2.2-2                    amd64        ASCII to PostScript filter
ii  acpi-support                  0.16+19.0.0-1              amd64        System Management BIOS support
ii  adduser                       1:3.118-1                    amd64        Add or modify user accounts
ii  apache2                        2.4.54-1                      amd64        Apache HTTP Server

Let's break down the output:

  • ii: Indicates the package is installed and configured.
  • a2ps: Package name.
  • 7.2.2-2: Package version.
  • amd64: Architecture.

Using apt-cache

apt-cache provides a higher-level interface to the package management system. You can use it to list installed packages in a more user-friendly format.

Here's how:

  1. Open a terminal window.
  2. Type the following command and press Enter:
apt-cache policy 

Replace <package_name> with the name of the package you want to check. This will display the package's current installation status, including the installed version.

Here's an example of the output:

apache2:
  Installed: 2.4.54-1
  Candidate: 2.4.54-1
  Version table:
 *** 2.4.54-1 500
      500 http://deb.debian.org/debian buster/main amd64 Packages

Let's break down the output:

  • Installed: The current installed version of the package.
  • Candidate: The candidate version available for upgrade.
  • Version table: Information about available versions and their sources.

Filtering the Output

You can filter the output of both dpkg and apt-cache to display specific information. Here are some useful options:

  • dpkg -l | grep <pattern>: Filters the output of dpkg -l to only show packages that match a specific pattern. For example, dpkg -l | grep apache will show only packages related to Apache.
  • apt-cache policy <package_name> | grep Installed: Filters the output of apt-cache policy to only show the installed version of the package.

**Listing All Installed Packages (Graphical) **

For a more visual way to see installed packages, you can use the Synaptic Package Manager.

Here's how to use it:

  1. Open Synaptic Package Manager by searching for it in your system's menu.
  2. Select "Installed" from the "Status" menu. This will display a list of all installed packages.

Understanding the Output

When you use dpkg -l or apt-cache policy, the output will provide information about the installed packages. Here's a quick breakdown of common terms:

  • ii: Package is installed and configured.
  • rc: Package is removed but configuration files are kept.
  • un: Package is not installed.
  • hd: Package is held back from upgrades.
  • Candidate: The version of the package that is available for upgrade.
  • Version table: Information about available versions and their sources.

Conclusion

By using the methods described above, you can easily list installed packages on your Debian system. Understanding the output of these commands is essential for managing your system effectively. Whether you're looking to check for specific packages, identify outdated software, or simply get a general overview of your installed programs, these tools provide you with the information you need.

Featured Posts