Skip to main content

pkgwho

PyPI version PyPI downloads Python 3.9-3.15

Find which package manager installed a command, font, desktop application, or GNOME Shell extension on Linux, or search installed packages by name. pkgwho checks dpkg/apt, Snap, Flatpak, pipx, uv tools, Cargo, and Homebrew, and suggests how to remove packages. It never uninstalls anything automatically.

Installation

Python 3.9 or newer is required.

Install directly from GitHub with pipx:

pipx install git+https://github.com/tos-kamiya/pkgwho.git

Usage

Pass one or more search terms. By default, pkgwho searches commands, packages, fonts, desktop applications, and GNOME Shell extensions for each term:

pkgwho git snap flatpak
pkgwho /usr/local/bin/my-command

The exit status is nonzero if any query has no result in the selected search types. In combined mode, a query succeeds if any search finds a result. Text output shows only matching searches, or one message if no search matched.

--type {command,package,font,desktop,gnome-extension,all}

Choose what to search. The default is all.

Type Search
command Resolve a command in PATH or a file path and identify its package owner.
package Find installed package names by case-insensitive partial match, including libraries.
font Find installed font family or full names by case- and punctuation-insensitive partial match.
desktop Search desktop application names, including translations, or .desktop filenames.
gnome-extension Search installed GNOME Shell extension names and UUIDs.
all Run all searches independently. A package may appear in more than one result.
pkgwho --type command git
pkgwho --type package chrome
pkgwho --type font "Noto Sans"
pkgwho --type desktop "スクリーンショット"
pkgwho --type desktop screenshot.desktop
pkgwho --type gnome-extension "Dash to Dock"

Command searches report unknown when no supported manager claims the file. They also report matching PATH entries in Bash, Zsh, and Fish configuration, including Fish's fish_user_paths. These entries are not proof of installation; configuration files are read but never executed or modified.

Font searches require Fontconfig's fc-list. Results include the font file and, when found in the dpkg or Homebrew formula database, its package and suggested uninstall command. Unowned files are still shown. An unavailable fc-list is reported and causes a nonzero exit status in font-only mode.

Desktop searches match Name and all translated Name[...] values by case-insensitive substring. A query ending in .desktop searches filenames instead; a .desktop path containing / examines that file directly. Searches use applications beneath XDG_DATA_HOME (default ~/.local/share) and each entry of XDG_DATA_DIRS (default /usr/local/share:/usr/share), recursively. When desktop IDs collide, the first directory takes precedence. Hidden entries and non-application entries are excluded. Results show the file and any package owner found through dpkg, Homebrew, Snap or Flatpak records; an unknown owner does not prevent a match. Snap and Flatpak exports are searched when their data directories are included in XDG_DATA_DIRS.

GNOME Shell extension searches match names and UUIDs by case-insensitive substring. They read gnome-shell/extensions/*/metadata.json under XDG_DATA_HOME and XDG_DATA_DIRS, so they also work outside a GNOME session. Results include the installation scope and any dpkg or Homebrew package owner. User extensions without a known package owner show a suggested gnome-extensions uninstall command.

--no-limit

Text output shows up to 20 matches per search. Use --no-limit to display all matches:

pkgwho --type package nvidia --no-limit

--json

Emit a JSON array for one or more queries:

pkgwho git unknown-tool --json

In combined mode, each array element contains query and a field for each search type that matched. In single-type mode, each element contains that search's result directly. JSON includes all matches without the text output's default 20-match limit.

-o FILE, --output FILE

Write the selected output format to a file instead of standard output. Existing files are overwritten:

pkgwho git --json --output results.json

-h, --help

Show command-line usage and exit.

--version

Show the installed pkgwho version and exit.

Supported managers

  • dpkg/apt: queries dpkg's file ownership database.
  • Snap: checks commands exposed in /snap/bin against installed snaps.
  • Flatpak: recognizes application launchers exported in Flatpak's exports/bin directories.
  • pipx: maps exposed applications from pipx list to their environments.
  • uv: maps exposed executables from uv tool list to installed tools.
  • Cargo: maps binaries from cargo install --list to installed crates.
  • Homebrew: queries installed formulae and matches files listed by Homebrew.

Development

Run the full test suite on CPython 3.9 through 3.15 with:

scripts/run_python_matrix.sh

The script uses uv, creates separate environments under .venv-matrix/, and installs the package and development dependencies in each environment.

License

pkgwho is distributed under the terms of the MIT license.

Metadata

Release files for pkgwho 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pkgwho 0.3.0
File Size Uploaded Provenance Actions
pkgwho-0.3.0.tar.gz 48.8 kB Without provenance Details for pkgwho-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pkgwho 0.3.0
File Interpreter ABI Platform Actions
pkgwho-0.3.0-py3-none-any.whl Python 3 none any Details for pkgwho-0.3.0-py3-none-any.whl

Total release size: 65.1 kB

Release files / pkgwho-0.3.0.tar.gz

Download URL pkgwho-0.3.0.tar.gz
Size 48.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b5e90cabcce72ec3ab1c2ea7522a3e92c0de86aa3902843204c9eb332dad758c
BLAKE2b-256 checksum
How to use checksums
840f97be431259a10a0bd9aa80680f9eb0c531c70253c51ae5f1af483006b558
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":null,"cpu":"x86_64","distro":{"id":"resolute","libc":{"lib":"glibc","version":"2.43"},"name":"Ubuntu","version":"26.04"},"implementation":{"name":"CPython","version":"3.15.2"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.9 29 Sep 2026","python":"3.15.2","system":{"name":"Linux","release":"7.0.0-44-generic"}} HTTPX2/2.17.0

Release files / pkgwho-0.3.0-py3-none-any.whl

Download URL pkgwho-0.3.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc1d13bbeef5d971776081cc1dd47a7af44b83a0561b6f54c38352d0f25f7e88
BLAKE2b-256 checksum
How to use checksums
7b7c55a1714b5ce6000bd8ab9b9d69ed8ef16193a4fb749178abc8b27f95739d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":null,"cpu":"x86_64","distro":{"id":"resolute","libc":{"lib":"glibc","version":"2.43"},"name":"Ubuntu","version":"26.04"},"implementation":{"name":"CPython","version":"3.15.2"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.9 29 Sep 2026","python":"3.15.2","system":{"name":"Linux","release":"7.0.0-44-generic"}} HTTPX2/2.17.0

Security for pkgwho 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page