How To List Installed Packages In Ubuntu, Debian, Kali, Mint

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-list-installed-packages-in-ubuntu-debian-kali-mint-with-dpkg-apt-get/
PINTEREST
PINTEREST
INSTAGRAM

Ubuntu, Debian, Kali and Mint distributions uses apt-get and dpkg commands for package management. We generally use this commands to install or remove packages from Linux systems. But in some cases we may need to list and count installed packages. In this tutorial we will look how to list and count all ready installed packages in Ubuntu, Debian, Kali and Mint.

List Installed Packages and Details with dpkg

We will start with dpkg package manager in order to list installed packages. We will use -l option which will list installed packages with their details. The detailed will provide following information.

List Installed Packages and Details with dpkg
List Installed Packages and Details with dpkg
  • name the package name
  • Version the package version number
  • Architecture the package cpu architecture
  • Description brief information about package

List Installed Packages Names Only with dpkg-query

As we have seen previous example dpkg will list a lot of information. But this will be problem in some cases and we will need only the package name. We can use dpkg-query to only list package names. We also provide some regex for this like below.

List Installed Packages Names Only with dpkg-query
List Installed Packages Names Only with dpkg-query

List Installed Packages Names Only with dpkg

We can also list only installed package names with dpkg too. We will use --get-selections option and some grep to remove lines those contains deinstall like below.

List Installed Packages Names Only with dpkg
List Installed Packages Names Only with dpkg

List Installed Packages and Details with apt-get or apt

We can also use apt or apt-get inorder to list installed packages and their details. In this example we will use apt and list command by providing --installed parameter to list installed packages.

LEARN MORE  How To Use Grep Command Recursively Through Sub-Directories In Linux?

List Installed Packages and Details with apt-get or apt
List Installed Packages and Details with apt-get or apt

Count Installed Packages with dpkg

We can also count installed packages by simply using wc command. In this example we will list installed package count with dpkg command.

Count Installed Packages with dpkg
Count Installed Packages with dpkg

Count Installed Packages with apt-get

We can also use apt and apt-get for installed package counting like below.

Search and Filter In Installed Packages with dpkg and grep

What if we are looking for a specific package and want to list wheter it is installed or not. We can search or filter installed packages with dpkg and grep .

Search and Filter In Installed Packages with dpkg and grep
Search and Filter In Installed Packages with dpkg and grep

Search and Filter In Installed Packages with apt and grep

We can filter installed packages with apt or apt-get and grep too.

Search and Filter In Installed Packages with apt and grep
Search and Filter In Installed Packages with apt and grep

Save Installed Packages List To A File

As a system administrator we generally need to migrate, clone or setup similar systems with required packages. We can get list of installed packages and install them another system easily. We save installed package names to a file like below.

Install Packages From List File with dpkg

We can restore given file which contains package names we want to install like below. We will use --set-selections.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-list-installed-packages-in-ubuntu-debian-kali-mint-with-dpkg-apt-get/
PINTEREST
PINTEREST
INSTAGRAM