How to list all installed packages in Ubuntu or Debian Linux?

You can list all installed packages in Ubuntu Linux by using the dpkg command with the --list option.

For example, to list all installed packages in a long format, you can use the following command:

$ dpkg --list

To list all installed packages in a shorter format, you can use the following command:

$ dpkg -l

You can also use the apt command to list all installed packages. For example:

$ apt list --installed

You can also use the aptitude command to list all installed packages. For example:

$ aptitude search '~i'

These commands will list all installed packages on your system, along with their version numbers and descriptions.

Here are some additional ways to list installed packages in Ubuntu Linux:

  1. You can use the dpkg-query command with the --list option to list all installed packages in a long format. For example:
$ dpkg-query --list
  1. You can use the dpkg-query command with the -l option to list all installed packages in a shorter format. For example:
$ dpkg-query -l
  1. You can use the dpkg-query command with the -W option to list all installed packages and their version numbers. For example:
$ dpkg-query -W
  1. You can use the dpkg-query command with the -f option and a FORMAT string to list selected information about all installed packages. For example, to list the package names and descriptions of all installed packages, you can use the following command:
$ dpkg-query -f '${Package} ${Description}\n' -W
  1. You can use the apt-cache command with the pkgnames option to list the names of all installed packages. For example:
$ apt-cache pkgnames
  1. You can use the apt-cache command with the policy option to list the package names and versions of all installed packages. For example:
$ apt-cache policy
  1. You can use the apt-cache command with the showpkg option to list the package names and dependencies of all installed packages. For example:
$ apt-cache showpkg

I hope this helps! Let me know if you have any questions.

Related Solutions