How to List Installed Packages on Linux Mint

Table of Contents
List Installed Packages on Linux Mint
It will be always helpful to know which packages are installed on your machine. By checking installed packages you can install these packages on another system. In this tutorial, you will learn how to list installed packages on Linux Mint, how to list a specific package, how to install check installed package version, etc.
List Installed Packages
Use the following instructions to list installed packages on Linux Mint.
1. List Packages with APT Command
You can list installed packages using apt
command. The apt
is a package manager in Linux Mint System. To list installed packages on Linux Mint, run following command in the terminal:
sudo apt list --installed
The output should be:

To check a specific package installed or not on the system you can use apt
command combined with grep command. To list specific package installed you can run the following command:
sudo apt list --installed | grep firefox
The output should be:

2. List Packages with DPKG Command
The dpkg
command is also used to list installed packages on Linux Mint. You can also install packages by using dpkg
command. To list all the installed packages you can run the following command:
dpkg --get-selections | grep -v deinstall
The output should look like:

You can also use the dpkg
command to list specific package installed on your system. In the following command, it will be checked that firefox package installed on your system or not.
dpkg --get-selections | grep firefox
The output should be:

3. List Packages with dpkg-query Command
The dpkg-query
command lists packages installed from dpkg command database. You can easily check the installed package from the dpkg command database using dpkg-query command. To list all the installed packages you can run the following command:
sudo dpkg-query -l
The output should look like:

As the installed packages list is huge. To pipe the output you can use less
command:
sudo dpkg-query -l | less
You can also use the dpkg
command to list specific package installed on your system. In the following command, it will be checked that firefox package installed on your system or not.
sudo dpkg-query -l | grep firefox
The output should be:

How to Export List of Installed Packages
You can export installed packages on Linux Mint using apt
command. To export all the installed packages you can run following command:
sudo apt list --installed > installed_packages.txt
By using dpkg-query
command you can export packages like given below:
sudo dpkg-query -f '${binary:Package}\n' -W > installed_packages.txt
You can install exported package with dpkg-query
command on another system using following command:
sudo xargs -a installed_packages.txt apt install
How to count number of packages installed
You can following command to check the number of packages installed on your system:
dpkg --list | wc --lines
The output should be:
1630
Conclusion
Here you have successfully learned How to List Installed Packages on Linux Mint. If you have any queries regarding this then please don’t forget to comment below.
LATEST POSTS
-
How to install Nginx on CentOS 7
-
How to Install Yarn on Ubuntu 18.04
-
How to Install Git on CentOS 8
-
How to Use Tail Command in Linux
-
How to Install Google Chrome on CentOS 7
-
How to Create Sudo User on Ubuntu
-
How to Install Ruby on Debian 10
-
How to Install Yarn on Linux Mint 10
-
How to Install MySQL on Ubuntu 18.04
-
How to Install PyCharm on Manjaro 18
-
How to Install PHP on Debian 10
-
How to Set Up Cron Job on Debian 10