October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to List Installed Packages on Ubuntu

Learn the exact Ubuntu commands for listing installed APT packages, manually installed packages, Snap and Flatpak apps, package files and package ownership—plus export and troubleshooting guidance.
Length10 min Posted Quest giverVGSources Team

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For ordinary Ubuntu packages installed through APT or local .deb files, run:

apt list --installed

This lists packages registered in Ubuntu’s Debian package database. It is not a complete list of every application on the computer: Snap, Flatpak, AppImage, source-built programs and manually copied binaries use separate inventories.

As an Amazon Associate I earn from qualifying purchases.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to List Installed Packages on Ubuntu

The right command depends on what you mean by “installed.” Use apt list --installed for a quick interactive list of every installed APT/.deb package. Use dpkg-query -W when you need clean package-and-version output for auditing or scripts, and apt-mark showmanual when you want packages marked as intentionally installed rather than their automatically added dependencies.

Ubuntu can also run software through Snap, Flatpak, AppImage files, language-specific package managers and programs compiled from source. Those do not necessarily appear in an APT query, so a complete software audit requires checking each format separately.

Choose the command that matches your goal

Goal Command What it covers
Quick list for interactive use apt list --installed All installed APT/.deb packages
Clean names and versions dpkg-query -W Packages registered as installed in the dpkg database
Status and troubleshooting table dpkg -l Package records with desired action, status and error flags
Packages marked manually apt-mark showmanual APT packages not marked as automatic dependencies
Packages with updates available apt list --upgradable Installed APT packages for which APT knows a newer version
Installed Snaps snap list Packages managed by snapd
Installed Flatpak applications flatpak list --app Flatpak applications, when Flatpak is installed
Package owning a file dpkg -S /path/to/file Files registered in the dpkg database
Files belonging to one package dpkg -L package-name The file list recorded for a selected package

List every installed APT package

Use APT for a quick, readable list

apt list --installed

APT’s list subcommand supports the --installed filter. Depending on your Ubuntu and APT versions, each line normally includes a package name, installed version, architecture and repository or release information. The exact formatting can change between releases; Ubuntu documents this filter in the APT manual.

You may see a message warning that APT’s command-line interface is not considered stable for scripts. That warning does not mean the interactive listing failed. To hide the warning when viewing or redirecting output, send standard error elsewhere:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
apt list --installed 2>/dev/null

Listing is read-only and normally does not require sudo. The result can be very long because it includes libraries, kernels, firmware, fonts, language runtimes and dependency packages as well as applications.

Understand the scope

This command reports packages known to APT and dpkg. A program installed as a Snap or Flatpak may be absent even when its launcher is visible in the desktop menu. AppImages, source builds and binaries copied into a directory are also outside this database.

Get cleaner output with dpkg-query

One package per line

dpkg-query -W

dpkg-query -W (the same operation as --show) is a lower-level query designed for the dpkg database. It is preferable to APT’s presentation when you are exporting data or feeding it to another command.

Print package names and versions

dpkg-query -W -f='${binary:Package}	${Version}
'

The format string emits the binary package name, a tab, the installed version and a newline. Include architecture information when a multi-architecture inventory matters:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
dpkg-query -W -f='${binary:Package}	${Version}	${Architecture}
'

Architecture-qualified names help distinguish, for example, native and foreign-architecture packages. The available fields and pattern behavior are described in the dpkg-query documentation.

Make output predictable for scripts

Human-oriented tables can change with locale and package-manager versions. Set a fixed locale and use an explicit format for machine parsing:

LC_ALL=C dpkg-query -W -f='${binary:Package}	${Version}
'

Ubuntu’s current dpkg-query guidance recommends a fixed locale such as C.UTF-8 when a script must parse output. Treat the resulting file as an inventory, not a full backup: repository settings, configuration files, application data and non-DEB software are not included.

Read package status with dpkg -l

dpkg -l

dpkg -l displays a status table. Its first three columns represent the desired action, package status and error flag. A normally installed package begins with ii: the first i means “install is desired,” and the second means “installed.” The third position is ordinarily blank.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The table can also contain records that are not currently installed. Common status codes include:

  • n: not installed
  • c: package removed but configuration files remain
  • H: half-installed
  • U: unpacked but not configured
  • F: half-configured
  • R: reinstall required

These states are defined in the dpkg-query manual. To display only rows whose desired action and status both indicate installation, filter the table:

dpkg -l | grep '^ii'

This is useful for a person diagnosing a broken package, but the formatted table is a poor interface for robust automation. Use an explicit dpkg-query format for scripts instead.

List only manually marked packages

apt-mark showmanual

This command produces a shorter list by excluding packages APT currently considers automatic dependencies. Sort it for an easier-to-read migration checklist:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
apt-mark showmanual | sort

“Manual” does not mean “a particular human installed this package.” A package can be marked manual because of a metapackage, an administrative script, a previous system state or another installation method. Conversely, a package you selected may later be represented by dependencies marked automatic. Treat this as a high-level selection list, not a historical installation log.

Check whether one package is installed

Use an exact status query

dpkg-query -W -f='${Status}
' firefox

An installed package returns:

install ok installed

A script-friendly test can turn that status into a success or failure message:

if dpkg-query -W -f='${Status}' firefox 2>/dev/null | grep -q 'ok installed'; then
    echo "Installed"
else
    echo "Not installed"
fi

Replace firefox with the exact package name. This tests the dpkg database, not a Snap, Flatpak or executable that happens to have the same name.

Query a package-name pattern

dpkg-query -W 'linux-image*'

Quote wildcard patterns so the shell passes them to dpkg-query unchanged. Pattern queries are useful for families of packages, while exact status checks are safer when a script must decide whether one package exists.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Search the installed list

dpkg-query -W | grep -i python

A substring search can return false positives: searching for java, for example, may match names that merely contain those letters. For an exact name, format only the package-name field and use fixed-string matching:

dpkg-query -W -f='${binary:Package}
' | grep -Fx python3

For a quick, human-oriented search, this also works:

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

Export the inventory to a file

Save names and versions

dpkg-query -W -f='${binary:Package}	${Version}
' > installed-packages.txt

The > operator overwrites an existing file. Use >> only when you intentionally want to append. Sorting creates stable output for comparison:

dpkg-query -W -f='${binary:Package}	${Version}
' | sort > installed-packages.txt

To include the date in the filename:

dpkg-query -W -f='${binary:Package}	${Version}
' > "installed-packages-$(date +%F).txt"

Export manually marked packages

apt-mark showmanual > manually-installed-packages.txt

These files are useful for audits, troubleshooting and migration planning. They do not preserve APT repository configuration, locally downloaded .deb files, package settings, user data, Snap channels, Flatpak remotes or software installed outside package managers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

List Snap packages separately

snap list

Snap’s official getting-started documentation identifies snap list as the command for installed Snaps; its output can include the name, version, revision, tracking channel, publisher and notes (Snap documentation).

The Rev value is a Snap Store revision, not necessarily the application’s conventional version number. Older disabled revisions retained on the system can be displayed with:

snap list --all

Snap is commonly ready on recent Ubuntu releases, but it may have been removed or disabled, and availability can differ by release or Ubuntu flavor. Snap packages belong to a separate system, so installing an application as a Snap does not make it appear in apt list --installed.

Read-only listing normally needs no sudo. If the shell reports snap: command not found, there is no Snap command available in that environment; check whether the software was installed another way rather than adding Snap solely to answer an inventory question.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

List Flatpak applications

Show applications only

flatpak list --app

Without --app, flatpak list can include runtimes as well as applications. To print only application IDs:

flatpak list --app --columns=application

Flatpak is optional on Ubuntu and may not be installed. A complete audit may need both installation scopes:

flatpak list --user
flatpak list --system

Flatpaks are not part of the APT package inventory. If the command is unavailable, the system may simply have no Flatpak installation; do not interpret that as proof that no non-APT software exists.

When APT, Snap and Flatpak still miss an application

No package-manager query can guarantee an inventory of every executable on a Linux system. Check these categories separately:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • AppImages: usually standalone files that are not registered in the Debian database.
  • Source builds: programs compiled and installed with a project’s own instructions.
  • Copied binaries and archives: files placed in /usr/local/bin, $HOME/.local/bin or another directory.
  • Language ecosystems: Python, Node.js, Rust and Ruby tools managed independently of APT.
  • Containers and virtual environments: software installed inside an image, container or isolated environment rather than the host.

Some useful supplementary checks are:

find ~/Applications ~/.local/bin /usr/local/bin -maxdepth 1 -type f 2>/dev/null
python3 -m pip list
npm list -g --depth=0
cargo install --list

Each command answers a different question. A Python package, for example, is not automatically an Ubuntu package, and a program inside a container is not installed on the host merely because its files are visible through a container tool.

Find which package owns a file

dpkg -S /usr/bin/curl

dpkg -S searches registered package file lists and returns the package associated with a path. Ubuntu’s package-management documentation covers this reverse lookup at ubuntu.com/server/docs/package-management.

Ownership is limited to files recorded by dpkg. It may not identify files generated later by maintainer scripts or alternatives, and it cannot identify content supplied by Snap, Flatpak, AppImage, source builds or manual copies. If a command is found through which or command -v but dpkg -S returns nothing, investigate those other installation methods.

List files installed by one package

dpkg -L ufw

Replace ufw with the package name. The equivalent query form is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
dpkg-query -L ufw

This is different from listing packages: dpkg -L shows paths recorded for one package, while dpkg -S starts with a path and searches for its owning package. The recorded list may omit extra files created by maintainer scripts or alternatives, as noted in the dpkg-query documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

List packages that can be upgraded

apt list --upgradable

--upgradable is an APT filter for installed packages for which the configured repositories advertise a newer version. It is not an inventory of everything installed. The filter is documented in the APT manual. Repository metadata must be current for the result to be meaningful, and the exact display can vary by APT version.

Troubleshoot misleading or incomplete results

The output is too long

Redirect it to a file, search it with grep, or page it interactively:

apt list --installed 2>/dev/null | less

Use apt-mark showmanual when the full dependency inventory is noise, but remember that “manual” is an installation state, not a personal activity log.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A row shows rc, iU or iF

Read the three status columns in dpkg -l. rc indicates removed package files with configuration files remaining; iU indicates unpacked but not configured; iF indicates a half-configured package. These entries explain why dpkg -l can look larger than a clean installed-only list.

If the package database is genuinely interrupted, the following are repair operations, not listing commands:

sudo dpkg --configure -a
sudo apt-get -f install

Review the proposed changes before confirming them. Run the queries again afterward to verify the resulting state.

A command is unavailable

  • apt: command not found usually means the environment is not a normal Ubuntu installation or its command path is damaged.
  • snap: command not found means Snap tooling is absent or disabled; it does not prove that no software is installed.
  • flatpak: command not found means Flatpak is not installed for that environment.

In containers, recovery shells and minimal images, package tools may differ from those on the host. Confirm which system you are querying before treating an empty result as a complete inventory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The application appears in the menu but not in APT

Check snap list and flatpak list --app, then look for AppImage files, binaries in user or local directories, language-specific installations and applications inside containers or virtual environments. Also check the package name rather than the product name: one application can consist of a metapackage, several dependencies or a differently named executable.

Important distinction: packages, applications and files

An Ubuntu package list is a database inventory, not a list of visible applications. System libraries, kernels, firmware, fonts and helper components appear alongside user-facing programs. Conversely, one application may be delivered as an APT package, a Snap, a Flatpak or a collection of supporting packages. For reliable troubleshooting, identify which question you are asking:

  • What Debian packages are installed? Query APT or dpkg.
  • What packages did APT mark as intentional selections? Query apt-mark showmanual.
  • What software is installed through Snap or Flatpak? Query those managers independently.
  • Which package supplied this path? Use dpkg -S for dpkg-registered files.
  • Which paths belong to this package? Use dpkg -L.

Keeping these inventories separate prevents the common mistake of calling an APT result “all installed software.”

Practical audit sequence

For a migration or troubleshooting snapshot, collect the inventories in separate files so their meanings remain clear:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Export APT package names, versions and architectures with dpkg-query.
  2. Export manually marked APT packages with apt-mark showmanual.
  3. Record Snap packages with snap list if Snap is available.
  4. Record Flatpak applications in both user and system scopes when Flatpak is available.
  5. Inspect known AppImage and local-binary directories.
  6. Record language-manager packages separately from operating-system packages.

This produces a more honest reconstruction plan than copying one package list. Reinstalling package names alone does not recreate repository configuration, application data, local files, Snap channels, Flatpak remotes or system settings.

Official references

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.