List all Installed Packages on Ubuntu and Debian-based Linux Distributions

We are still not in a utopia to have all the rolling-out versions of packages inside solo repositories for which we have to use a different medium to install them.

Today, you will learn how to list all the installed packages from Apt, Deb, Snap, and Flatpak on Ubuntu and Debian-based Linux Distributions.

List Apt and Deb Installed Packages

Apt and .deb file installed packages can be easily listed using apt list command similar to dpkg --list those used to display a list of packages satisfying certain criteria.

It supports options for matching specific conditions such as listing installed packages using --installed, upgradeable --upgradeable or all available versions of packages using --all-versions.

Execute the below command to list all the installed packages using the apt package manager.

$ apt list --installed

Since the package list is long, it is a good idea to pipe it with less command to show one page at a time.

$ apt list --installed | less

Execute the below command to save the output of installed packages using apt package manager in packages.txt.

$ apt list --installed > packages.txt

To find whether the specific application is installed or not, you can filter the output using the grep command along with the application name. For example to find whether the firefox is installed or not in your system you can use the below command.

$ apt list --installed | grep firefox
firefox-locale-en/focal-updates,focal-security,now 100.0.2+build1-0ubuntu0.20.04.1 amd64 [installed]
firefox/focal-updates,focal-security,now 100.0.2+build1-0ubuntu0.20.04.1 amd64 [installed,automatic]

The dpkg-query command also works in the same way as an apt list. It displays information about the package from the dpkg database as shown below.

$ dpkg-query -l

List Installed Packages using Aptitude

Users using separate package management programs for Debian and Ubuntu packages such as Aptitude can very easily list installed packages with or without dependencies.

The output of Aptitude is more refined than a apt list --installed command, displaying installed applications with their context as shown below.

$ aptitude search '!~M ~i'

The above command will list the packages that were manually installed by you without listing their dependencies.

Use the below command to list the manually installed applications by your with their dependencies.

$ aptitude search ~i

List Snap Installed Packages

Use the below command to list the snap store installed packages.

$ snap list

If you have a large collection of snap packages and have a hard time finding specific applications then pipe the grep command with snap to find the specific packages.

$ snap list | grep vlc

List Flatpak Installed Packages

To list flatpak installed packages, use the below command.

$ flatpak list

List the recently installed packages

So far you know how to list all the installed packages in your system. What if you want to find out about the recently installed packages.

Thanks to the goodness of Linux, it stores all the recently installed applications in the log file with the installation date and timing in your system.

The log file is stored at “/var/log/apt/history.log”, to list only the installed packages use the grep command with the ” install “ file as shown below.

$ grep " install " /var/log/apt/history.log

When any package is installed in your Linux system, it requires dependencies to work properly. To list all the dependencies installed with packages can be listed in the same way you listed the recently installed packages.

The list of all installed dependencies stored at “/var/log/dpkg.log” can be output using the grep command with a filter of ” install “ as shown below.

$ grep " install " /var/log/dpkg.log

[GUI] List installed Packages using Software Center

If you are uncomfortable with the CLI method of listing installed packages, you can use the built-in software center on Ubuntu to list all the installed packages on your system.

Open “Software center” and click on the installed tab as shown below.

List Installed Software in Ubuntu Software Center
List Installed Software in Ubuntu Software Center

Final Word

I hope this article will help you to see the list of installed packages on your system, including recently installed.

If you have any queries write us in the comment section.

0 0 votes
Article Rating
Notify of
Newest Most Voted
Inline Feedbacks
View all comments
1 year ago

The Aptitude output is much better:
sudo aptitude search ‘~i!~M’ – shows all explicitly installed packages without the dependencies
sudo aptitude search ‘~i’ – shows all installed packages including the dependencies