How To

List Installed Packages on Ubuntu Like a Pro

Managing software on Linux becomes much easier when you know how to List Installed Packages efficiently. Over time, Ubuntu systems collect hundreds or even thousands of packages. As a result, checking installed software helps with troubleshooting, system audits, migrations, and cleanup tasks.

Ubuntu provides several built-in tools that make package management simple. Whether you want a quick overview of installed applications or detailed package information, commands like apt and dpkg-query can handle the job smoothly.

Why You Should List Installed Packages

There are many situations where viewing installed packages becomes useful. For example, system administrators often audit software before upgrades or server migrations. Developers also verify dependencies before deploying applications.

Additionally, package listings help identify unnecessary software, missing utilities, or version conflicts. Because Ubuntu stores package metadata locally, these commands run quickly without requiring internet access.

List Installed Packages Using APT

The easiest way to display installed packages on Ubuntu is through the apt command. Since apt combines several package management functions, it offers a user-friendly interface for day-to-day tasks.

Run the following command in your terminal:

apt list --installed

This command prints all installed packages along with version numbers, repository details, and architecture information.

If the output feels overwhelming, you can scroll through it more comfortably using:

apt list --installed | less

Moreover, Ubuntu users can suppress warning messages with:

apt list --installed 2>/dev/null

Filter and List Installed Packages Quickly

Sometimes you only need to check whether a specific package exists on your system. In that case, combine apt with grep.

For example:

apt list --installed 2>/dev/null | grep '^nginx/'

This command searches for the nginx package directly. Therefore, it saves time when troubleshooting software installations.

Another useful option involves displaying only manually installed packages. This helps separate user-installed software from automatic dependencies.

apt-mark showmanual

Use dpkg to List Installed Packages

Although apt is easier for most users, dpkg-query provides more technical details. Many administrators prefer it because the output remains stable across Debian-based distributions.

Run this command:

dpkg-query -l

You can also search for one package specifically:

dpkg-query -l 'curl'

Packages marked with ii indicate successfully installed software.

In addition, dpkg allows you to inspect package details:

dpkg -s nginx

To see every file installed by a package:

dpkg -L nginx

Export Installed Package Lists

Exporting package lists becomes helpful when cloning environments or rebuilding systems. Ubuntu allows you to save installed packages into a text file easily.

dpkg-query -f '${binary:Package}\n' -W > packages_list.txt

Later, you can reinstall everything on another machine using:

sudo xargs -a packages_list.txt apt install

This approach simplifies server migrations and backup planning.

Conclusion

Learning how to List Installed Packages on Ubuntu gives you better control over your Linux environment. Commands like apt, dpkg-query, and apt-mark help you audit software, troubleshoot issues, and manage dependencies efficiently. Whether you maintain personal systems or enterprise servers, mastering these package management tools can save significant time and effort.

Cyber Defence

Recent Posts

How To Use Variables In Bash Scripts

Introduction Variables are one of the most important basics of Bash scripting. A variable is…

18 hours ago

How To Run A Bash Script In Linux Step By Step

Introduction Running a Bash script in Linux is a basic but important skill for anyone…

19 hours ago

How To Write Your First Bash Script In Linux Step By Step

Introduction Writing your first Bash script in Linux is one of the best ways to…

19 hours ago

Install Docker on Ubuntu 24.04 With Easy Setup Guide

Docker has become one of the most important tools in modern software development. If you…

20 hours ago

APT Command Linux: Essential Package Management Guide

The APT Command Linux users rely on is one of the most powerful tools for…

23 hours ago

Install RPM on Ubuntu: Easy Guide to Run RPM Packages

Ubuntu users usually install software through .deb packages or the APT package manager. However, some…

1 day ago