How to Check If Software Is Installed in Linux
Linux Guide

The Fastest Ways to Know If A Software Is Installed on Linux

Stop guessing. Here are the commands and tools that actually tell you, in seconds, whether any package is on your system.

⏱ 9 min read 🖥 All major distros 📅 Updated June 2026

What You’ll Learn

Seven reliable methods — from one-liner commands to GUI tools — to check if any software is installed on Debian, Ubuntu, Fedora, Arch, and more. Each method is tested and explained with real examples and honest trade-offs.

Quick Reference: Commands at a Glance

Before diving deep, here’s a cheat-sheet of the most commonly used commands across distros. Pick the one that matches your system.

which <name>Works on every Linux system
dpkg -l <name>Debian / Ubuntu
rpm -q <name>Fedora / RHEL / CentOS
pacman -Q <name>Arch / Manjaro
apt list –installedAPT-based distros
snap listSnap packages
flatpak listFlatpak apps
command -v <name>Shell built-in check

Method Comparison Table

Not every command works on every distro. Here’s the full picture so you can stop trying random commands and go straight to the right one.

Method Works On Speed Best For
which All distros Instant CLI tools, executables
command -v All distros Instant Shell scripts & automation
dpkg -l Debian, Ubuntu Fast Full package metadata
apt list Debian, Ubuntu Fast Listing installed packages
rpm -q Fedora, RHEL, CentOS Fast RPM-based package check
pacman -Q Arch, Manjaro Fast Arch package database
snap list Ubuntu + others Medium Snap-packaged apps
flatpak list Most modern distros Medium Flatpak sandboxed apps
GUI Software Center Desktop environments Medium Non-technical users
find / -name All distros Slow Manually installed software
Command Speed Comparison (lower bar = faster result)
which
<0.1s
⚡ Best
command -v
<0.1s
⚡ Best
dpkg -l
~0.3s
Fast
rpm -q
~0.3s
Fast
pacman -Q
~0.3s
Fast
snap list
~1.5s
OK
flatpak list
~2s
OK
find /
30-120s
Slow
1

Using which — The Universal First Check

This is the first command I reach for, every single time. which searches your system’s PATH and tells you exactly where an executable lives — or stays silent if it doesn’t exist.

Terminal — works on any Linux distro
which git /usr/bin/git # If nothing is returned, it's not installed (or not in PATH) which htop # (no output = not found)

The beauty of which is speed. It’s a near-instant check. I use it constantly when SSH-ing into remote servers where I’m not sure what’s been set up. The one caveat: it only finds things in your PATH. A program installed to a custom directory won’t show up here.

✅ Pros

  • Available on every Linux system
  • Results in under 0.1 seconds
  • Shows exact executable path
  • No flags or options required

❌ Cons

  • Only checks the PATH environment
  • Won’t find manually installed software in custom dirs
  • No package version info
2

Using command -v — The Scripting Standard

If you write bash scripts, use this one instead of which. It’s a shell built-in, meaning it works even in minimal environments where which might not be installed.

Terminal / Bash Script
command -v curl /usr/bin/curl # Use in scripts for conditional installs: if command -v node > /dev/null 2>&1; then echo "Node.js is installed" else echo "Node.js is not installed" fi

The > /dev/null 2>&1 part suppresses all output so your script only acts on the exit code. This pattern is widely used in DevOps and setup scripts precisely because it’s reliable across different shell environments.

Pro Tip: In scripts, always prefer command -v over which. It’s POSIX-compliant and more portable across different Linux environments and shells.
3

Using dpkg — For Debian and Ubuntu Systems

If you’re on Ubuntu, Debian, Linux Mint, or any APT-based distro, dpkg is the package manager’s own database query tool. It gives you full installation status, not just whether the binary exists.

Ubuntu / Debian Terminal
dpkg -l nginx Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-===========-============-============-======================== ii nginx 1.24.0-2 amd64 high performance web server # The "ii" at the start means: installed and working correctly # Quick one-liner to just check existence: dpkg -l | grep -i python3

The status codes in dpkg output tell a more complete story than a simple yes/no. “ii” means fully installed. “rc” means the package was removed but config files remain. This matters when you’re troubleshooting a partially removed package.

✅ Pros

  • Shows version and architecture
  • Reveals partial installs and config leftovers
  • Fast database query
  • Can list all installed packages

❌ Cons

  • Debian / Ubuntu only
  • Won’t show Snap or Flatpak apps
  • Output can be verbose

Looking for Developer Tools & Resources?

Check out our in-depth reviews of free developer tools and platforms that make Linux workflows faster.

Explore Free Dev Tools →
4

Using apt — Quick Check on Ubuntu/Debian

apt is the friendlier front-end to dpkg. You can use it to list installed packages or check if a specific one is present without digging through dense output.

Ubuntu / Debian Terminal
# Check if a specific package is installed apt list --installed 2>/dev/null | grep -i vim vim/jammy,now 2:8.2.3995-1ubuntu2.21 amd64 [installed] # Show full info including install state apt show vim # Check if a package is installed (clean output) apt -qq list vim 2>/dev/null vim/jammy,now 2:8.2.3995-1ubuntu2.21 amd64 [installed]

I use apt list --installed | grep when I’m not sure about the exact package name. The grep lets me search loosely. For example, searching “python” will show you every Python-related package currently installed on the system.

5

Using rpm — For Fedora, RHEL, and CentOS

On RPM-based distributions, rpm -q is your go-to. It’s clean, fast, and tells you exactly what version is installed. I’ve used this countless times on RHEL servers at work.

Fedora / RHEL / CentOS Terminal
# Check if a package is installed rpm -q httpd httpd-2.4.58-1.fc39.x86_64 # If not installed: rpm -q git package git is not installed # List all installed packages rpm -qa | grep -i mariadb # Using DNF (modern Fedora) dnf list installed | grep -i nginx
Note: On modern Fedora systems (28+), you can also use dnf list installed which gives a cleaner, more readable output and supports partial name matching better than raw rpm queries.

✅ Pros

  • Returns exact package version
  • Clear “not installed” message
  • Scriptable and reliable
  • Works across RHEL family

❌ Cons

  • RPM-based distros only
  • Doesn’t check Flatpak/Snap apps
  • Case-sensitive package names
6

Using pacman — For Arch Linux and Manjaro

Arch users know this one by heart. pacman -Q queries the local package database — no internet required, no delay.

Arch Linux / Manjaro Terminal
# Query if a package is installed pacman -Q firefox firefox 122.0-1 # If not installed: pacman -Q vim error: package 'vim' was not found # Search installed packages pacman -Qs python # List all installed packages pacman -Q

What I appreciate about pacman -Qs (the search variant) is that it does fuzzy matching. So even if you can’t remember whether it’s “python3” or “python” or “python-pip”, searching “python” will surface everything related. Super useful when you’re working with a package you set up months ago and forgot the exact name.

Which Command Should You Use? (Decision Flow)

Still not sure which method fits your situation? This diagram walks you through the decision in about five seconds.

Start: Check if installed? Do you know your distro? No Yes which any distro Writing a script? Yes command -v POSIX-safe No Which distro family? Debian/Ubuntu Fedora Arch/Manjaro dpkg -l or apt list –installed rpm -q or dnf list installed pacman -Q or pacman -Qs for search App from Snap or Flatpak? snap list | flatpak list
7

Checking Snap and Flatpak Packages

Here’s something a lot of people miss. If you installed an app from the Snap store or as a Flatpak, it won’t show up in dpkg or rpm. Those are completely separate packaging systems and need their own check.

Snap packages
snap list Name Version Rev Tracking Publisher core22 20240111 1380 latest/stable canonical✓ vlc 3.0.20 3078 latest/stable videolan✓ discord 0.0.40 179 latest/stable snapcrafters # Check a specific snap package snap list vlc
Flatpak packages
flatpak list Name Application ID Version Branch Origin GIMP org.gimp.GIMP 2.10.36 stable flathub Spotify com.spotify.Client 1.2.31 stable flathub # Check if a specific flatpak app is installed flatpak list | grep -i spotify

I learned this the hard way. A user on a server I was auditing insisted a specific application was installed. dpkg said no. Turns out it was installed as a Flatpak. Neither of us thought to check there first. Always cover all three package systems if you’re unsure how something was originally installed.

When All Else Fails: Using find

Sometimes software is installed manually — someone compiled it from source or dropped a binary directly into a directory. No package manager knows about it. For those cases, find is your last resort.

Terminal — searches entire filesystem
# Search for an executable by name across the whole system sudo find / -name "ffmpeg" -type f 2>/dev/null /usr/local/bin/ffmpeg # Limit search to likely locations for speed sudo find /usr /opt /home -name "node" -type f 2>/dev/null # Check version after finding /usr/local/bin/ffmpeg -version
Warning: Running find / on a large filesystem can take several minutes. Narrow the search to common directories like /usr, /opt, /home, and /usr/local when you can. The 2>/dev/null hides permission errors so your output stays clean.

Faster Alternative: locate

If find is too slow, locate queries a pre-built database and returns results almost instantly. The catch: the database needs to be updated periodically.

Terminal — using locate
# First, update the locate database sudo updatedb # Then search for the executable locate ffmpeg /usr/local/bin/ffmpeg /usr/local/share/man/man1/ffmpeg.1

Distro-by-Distro Command Reference

Here’s the consolidated command reference organized by distro. Bookmark this and you won’t need to search again.

Distribution Package Manager Check Single Package List All Installed
Ubuntu / Debian / Mint APT / dpkg dpkg -l nginx dpkg -l
Fedora DNF / RPM rpm -q nginx dnf list installed
RHEL / CentOS / AlmaLinux YUM / RPM rpm -q nginx rpm -qa
Arch Linux / Manjaro Pacman pacman -Q nginx pacman -Q
openSUSE Zypper / RPM rpm -q nginx zypper se -i
Gentoo Portage equery l nginx qlist -I
Alpine Linux APK apk info nginx apk info
Any (Snap) Snapd snap list vlc snap list
Any (Flatpak) Flatpak flatpak list | grep gimp flatpak list

🛠 Interested in vibe coding and developer tools? See which tools we tested and recommend for Linux devs.

See Best Coding Tools

Real-World Scenarios (And What to Run)

Scenario 1: “Did someone install Docker on this server?”

First try which docker. If that returns a path, Docker is installed. Then confirm the version with docker --version. If which finds nothing, check with the distro package manager (dpkg -l docker* or rpm -qa | grep docker) in case it was installed but the binary isn’t in PATH.

Scenario 2: “Is Python 3 installed and which version?”

Check Python and its version
which python3 /usr/bin/python3 python3 --version Python 3.11.6 # On Ubuntu, also check for specific versions dpkg -l | grep python3

Scenario 3: “I removed a package but something still seems to be running”

This is where dpkg status codes help. Running dpkg -l | grep nginx and seeing “rc” instead of “ii” means the package was removed but config files remain. Use sudo apt purge nginx to fully clean it up.

Scenario 4: “Is Node.js installed globally for all users?”

Check system-wide Node.js vs user-installed
which node node --version # If using nvm (Node Version Manager), check separately: nvm list # Or check common install locations ls /usr/local/bin/node /usr/bin/node 2>/dev/null

🤖 Want smarter ways to manage software and automate your workflow? Check out our AI automation tool review.

Explore Turbotic AI →

Common Mistakes When Checking for Installed Software

Mistake What Happens Fix
Using which on a Snap app May return nothing even if installed Run snap list separately
Wrong distro’s package manager Command not found error Check distro with cat /etc/os-release
Case-sensitive package name dpkg -l Git fails, dpkg -l git works Add -i flag to grep: grep -i
Ignoring nvm / pyenv / rbenv Version manager installs hidden from pkg manager Run nvm list, pyenv versions
Not checking PATH which fails for binaries not in PATH Use find or check echo $PATH
Assuming “removed” = “gone” Config files linger after apt remove Use apt purge for full removal
Linux Package Ecosystem Overview
System Package Mgr dpkg / apt rpm / dnf / yum pacman zypper / apk → Tightly integrated → Distro-specific → Fastest queries Most Reliable Universal Containers snap flatpak AppImage → Sandboxed → Cross-distro → Separate check Check Separately Manual / Custom compiled from source downloaded binary version managers (nvm, pyenv, rbenv) → Not tracked → Use find / locate → which / command -v Hardest to Find

Bonus: One-Line Script to Check Multiple Packages

When you’re setting up a new machine or auditing a server, you often need to check a whole list at once. Here’s a quick script to do exactly that.

Bash — check multiple packages at once
#!/bin/bash # Check if a list of programs is installed for pkg in git curl wget vim node python3 docker nginx; do if command -v "$pkg" > /dev/null 2>&1; then echo "✓ $pkg is installed: $(command -v $pkg)" else echo "✗ $pkg is NOT installed" fi done

Save this as check_tools.sh, run chmod +x check_tools.sh, then execute it with ./check_tools.sh. You’ll get a clean pass/fail list for every tool you care about. I use a version of this at the start of every new server setup.

Want to Speed Up Your Development Workflow?

Discover AI-powered coding assistants and automation tools that work seamlessly on Linux.

Check Out Ultracite AI

Frequently Asked Questions

What’s the single fastest way to check if a program is installed?

Type which programname. If you get a file path back, it’s installed. If you get nothing, either it’s not installed or it’s not in your PATH. This works across every Linux distribution.

How do I check without knowing the exact package name?

Use dpkg -l | grep -i keyword on Debian/Ubuntu, or rpm -qa | grep -i keyword on Fedora/RHEL. The -i flag makes it case-insensitive, so you can search loosely and still find what you’re looking for.

Why does which say a program isn’t installed when I can run it?

Two common reasons: the binary isn’t in your PATH, or it’s installed via a version manager like nvm or pyenv that adds it to PATH only in certain shell contexts. Try opening a new terminal session or running source ~/.bashrc and checking again.

Can I check if software is installed without root access?

Yes. Commands like which, command -v, dpkg -l, rpm -q, and pacman -Q all work without sudo. Only find / across the entire filesystem may need elevated permissions to read some directories.

How do I find the version of an installed package?

After confirming it’s installed, run the program with --version (e.g., git --version), or query the package manager directly: dpkg -l git on Ubuntu or rpm -q git on Fedora both include the version in the output.

More Posts You Might Find Useful

Wrapping Up

Checking whether software is installed on Linux is genuinely simple once you know which tool to reach for. For everyday use, which and command -v cover most situations in under a second. When you need package metadata or version details, jump to your distro’s native manager — dpkg, rpm, or pacman depending on what you’re running.

Don’t forget to check Snap and Flatpak separately if you use those ecosystems. And for software installed outside any package manager, find and locate have your back.

The script in the bonus section is probably the most immediately useful thing here — customize it with the packages your projects depend on, and you’ll always know the state of any machine within seconds.

Discover Tools Before Everyone Else!

We don’t spam! Read our privacy policy for more info.

Advertisement