Forrest logo
back to the dpkg tool

dpkg:tldr:f6663

dpkg: List installed packages.
$ dpkg -l ${pattern}
try on your machine

The command "dpkg -l ${pattern}" is used to list the installed packages that match a specific pattern.

Here is a breakdown of the command:

  • "dpkg" stands for "Debian Package Manager." It is a command-line tool in Debian-based Linux distributions (such as Ubuntu) for handling package management tasks.

  • "-l" is a flag or option for the "dpkg" command. It is short for "list" and is used to display information about installed packages.

  • "${pattern}" is a placeholder for the pattern that you want to match in the package names. It can be a specific package name or a regular expression pattern.

When you run the command with a specific pattern, it will display a list of installed packages that match that pattern. The output typically includes the package name, version, and a short description.

For example, if you run "dpkg -l vim", it will show information about the installed "vim" package. If you run "dpkg -l 'python'", it will display a list of installed packages containing the term "python" in their package names.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the dpkg tool