Applications
System Management
Software
Installation
IT Tools

Get installed applications in a system

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

Listing installed applications on a system varies by operating system. Windows uses the registry and PowerShell, macOS uses system_profiler and the /Applications directory, and Linux uses package managers like apt, dnf, or pacman. Each approach returns different levels of detail, from simple application names to full version numbers, install dates, and package sizes. Knowing these commands is essential for system administration, auditing, and automation.

Windows

powershell
1# List all installed programs from the registry
2Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
3    Select-Object DisplayName, DisplayVersion, Publisher, InstallDate |
4    Sort-Object DisplayName |
5    Format-Table -AutoSize
6
7# Include 32-bit apps on 64-bit systems
8Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* |
9    Select-Object DisplayName, DisplayVersion, Publisher |
10    Sort-Object DisplayName

Combined query for all installed apps

powershell
1# Both 64-bit and 32-bit registry paths + current user
2$paths = @(
3    "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*",
4    "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*",
5    "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
6)
7
8$apps = $paths | ForEach-Object { Get-ItemProperty $_ } |
9    Where-Object { $_.DisplayName } |
10    Select-Object DisplayName, DisplayVersion, Publisher, InstallDate |
11    Sort-Object DisplayName -Unique
12
13$apps | Format-Table -AutoSize
14$apps | Export-Csv -Path "installed_apps.csv" -NoTypeInformation

Using WMIC (Legacy)

cmd
wmic product get name,version,vendor /format:csv > installed_apps.csv

Note: wmic product only lists MSI-installed applications, not all software. It is also deprecated in Windows 11. Use PowerShell instead.

macOS

system_profiler

bash
1# List all installed applications
2system_profiler SPApplicationsDataType
3
4# Just names and versions (parseable output)
5system_profiler SPApplicationsDataType -json | \
6    python3 -c "
7import json, sys
8data = json.load(sys.stdin)
9for app in data.get('SPApplicationsDataType', []):
10    print(f\"{app.get('_name', 'Unknown'):40s} {app.get('version', 'N/A')}\")
11" | sort

List /Applications directory

bash
1# Simple listing
2ls /Applications/
3
4# With .app removed for cleaner output
5ls /Applications/ | sed 's/\.app$//'
6
7# Include user-installed apps
8ls ~/Applications/ 2>/dev/null

Using Homebrew

bash
1# List Homebrew formulae (CLI tools)
2brew list --formula
3
4# List Homebrew casks (GUI applications)
5brew list --cask
6
7# Show versions
8brew list --versions

Mac App Store apps

bash
1# List apps installed from the Mac App Store (requires mas CLI)
2# Install: brew install mas
3mas list
4# 497799835  Xcode  (15.2)
5# 409183694  Keynote  (14.0)

Linux

Debian/Ubuntu (apt/dpkg)

bash
1# List all installed packages
2dpkg --list
3dpkg -l | grep "^ii"  # Only installed packages
4
5# Just names
6dpkg --get-selections | grep -v deinstall
7
8# With versions
9apt list --installed
10
11# Search for a specific package
12dpkg -l | grep nginx

Red Hat/CentOS/Fedora (dnf/rpm)

bash
1# List all installed packages
2dnf list installed
3rpm -qa
4
5# With details
6rpm -qa --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' | sort
7
8# Search for a package
9rpm -qa | grep httpd

Arch Linux (pacman)

bash
1# All installed packages
2pacman -Q
3
4# Explicitly installed (not dependencies)
5pacman -Qe
6
7# Foreign packages (AUR)
8pacman -Qm
9
10# With sizes
11pacman -Qi | grep -E "^(Name|Installed Size)"

Snap and Flatpak

bash
1# Snap packages
2snap list
3
4# Flatpak applications
5flatpak list
6flatpak list --app  # Only apps, not runtimes

Cross-Platform with Python

python
1import subprocess
2import platform
3
4def get_installed_apps():
5    system = platform.system()
6
7    if system == "Windows":
8        cmd = ['powershell', '-Command',
9               'Get-ItemProperty HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\* | '
10               'Select-Object -ExpandProperty DisplayName']
11    elif system == "Darwin":  # macOS
12        cmd = ['system_profiler', 'SPApplicationsDataType', '-json']
13    elif system == "Linux":
14        cmd = ['dpkg', '--get-selections']
15    else:
16        return []
17
18    result = subprocess.run(cmd, capture_output=True, text=True)
19    return result.stdout.strip().split('\n')
20
21apps = get_installed_apps()
22for app in apps[:10]:
23    print(app)

Common Pitfalls

  • Windows wmic product is slow and incomplete: wmic product get name triggers MSI consistency checks (slow) and only shows MSI-installed apps. Registry queries via PowerShell are faster and more complete.
  • Missing 32-bit apps on 64-bit Windows: The Wow6432Node registry path contains 32-bit app entries on 64-bit systems. Query both paths to get a complete list.
  • macOS /Applications misses non-standard installs: Some apps are installed in /usr/local/, ~/Applications/, or via Homebrew. Check all locations for a complete inventory.
  • Linux package managers only show their own packages: dpkg does not know about Snap or Flatpak apps. Query each package manager separately to get a full list.
  • Confusing packages with applications: On Linux, dpkg -l lists thousands of packages including libraries and system components. Filter with dpkg -l | grep -E "^ii" and search by name to find specific applications.

Summary

  • Windows: Use PowerShell with Get-ItemProperty on the Uninstall registry keys for the most complete list
  • macOS: Use system_profiler SPApplicationsDataType for all apps, brew list for Homebrew packages
  • Linux: Use dpkg -l (Debian/Ubuntu), rpm -qa (RHEL/Fedora), or pacman -Q (Arch) depending on the distribution
  • Always check multiple sources (registry paths, package managers, app stores) for a complete inventory
  • Export to CSV or JSON for auditing and automation

Course illustration
Course illustration

All Rights Reserved.