Easy Ways to Check Linux Packages Installed on Your System

Easy Ways to Check Linux Packages Installed on Your System

ยท

4 min read

As a Linux user, it's essential to know which packages are installed on your system. This knowledge can help you manage your system effectively, identify unnecessary packages for removal, and make migrating to a new system more efficient. This guide will show you how to view installed packages on various Linux distributions, including Ubuntu, Debian, CentOS, Arch Linux, and openSUSE.

Display Installed Packages on Ubuntu/Debian

Debian-based distributions use the APT package manager for package management tasks. With APT, you can view a list of all installed packages, their versions, and other details on Debian/Ubuntu systems.

To display all installed packages on Debian-based systems, enter the following command:

apt list --installed

Packages will have tags like [installed], [installed,automatic], or [installed,local].

  • [installed] indicates packages installed from the official repository.

  • [installed,automatic] signifies packages installed as dependencies for other software.

  • [installed,local] refers to packages installed locally using dpkg -i rather than from a repository.

To search for a specific program in the list, use the grep command:

apt list --installed | grep program_name

You can also use the dpkg utility to display installed packages:

dpkg -l

To show only the names of installed packages, combine the dpkg command with awk:

dpkg -l | awk '{print $2}'

Check Installed Packages on RHEL-Based Systems

RHEL-based systems use YUM and DNF for package management. While YUM has been replaced by DNF in newer distributions, it still works on older systems. RPM is another option for installing and managing local RPM packages.

To display installed packages on RHEL-based systems with YUM, use:

yum list installed

For DNF-installed packages, use:

dnf list installed

You can also use rpm to display installed packages:

rpm -qa

The --last option lists recently installed packages, with the latest at the top:

rpm -qa --last

To display the installation date and time along with package names, use:

rpm -qa --last | tac

Show Installed Packages on Arch Linux

Pacman is the default package manager for Arch-based distributions like Manjaro and EndeavourOS. With Pacman, you can manage packages, update outdated ones, and view a list of installed packages.

To display installed packages on Arch-based systems, use:

pacman -Q

For explicitly installed packages, use:

pacman -Qe

For foreign packages installed from non-main repositories, use:

pacman -Qm

To search for a specific package in the list, use:

pacman -Q | grep <package_name>

See Installed Packages on openSUSE

OpenSUSE uses Zypper as its default command-line package manager. To display installed packages on openSUSE, use either:

zypper search --installed-only

Or:

zypper se -i

To check for a specific package, use:

zypper se -i <package_name>

To display information about an installed package, use:

zypper info <package_name>

Review Installed Snap Packages on Linux

Snap is a universal package manager supported on all major Linux distributions. It simplifies software installation by bundling dependencies with packages.

To display installed Snap packages on any Linux distribution, run:

snap list

This command shows packages installed using Snap, not those installed with default package managers. It also provides additional information, such as version number, revision number, channel information, publisher name, and other details if available.

Display Installed Flatpak Packages

Flatpak is another tool for simplified package management on Linux. It allows you to build, install, and run applications on Linux systems.

To display installed Flatpak packages, use:

flatpak list

This command shows all installed Flatpak packages and runtimes. To display only installed applications, use:

flatpak list --app

To display only installed runtimes, use:

flatpak list --runtime

For detailed information about listed items, use:

flatpak list -d

To display only installed application names, use:

flatpak --columns=name list

Save Installed Programs List to a File

To save the list of installed programs to a file, use the redirect operator (\>) followed by the filename:

apt list --installed > installed_programs.txt

Count Installed Packages

To count the number of installed packages, use the wc command:

zypper search --installed-only | wc -l

Mastering Linux Package Management

Understanding the packages installed on your Linux system helps you maintain, update, and remove packages efficiently. It also eases the transition to a new system by allowing you to install programs without the need to remember them individually.

ย