Skip to main content

pkgmap

Cross-distribution Linux package name resolution.

Different distributions often package the exact same software under different names (for example, ninja on Arch is ninja-build on Debian and Alpine; bat on Arch is rust-bat on Debian and Fedora; fd on Arch is rust-fd-find on Debian; Nixpkgs uses specific attribute paths). pkgmap provides an offline SQLite database and a companion Python library/CLI to translate package names between any pair of Linux distributions, resolve packages across all repositories, or look up native packages by upstream project name.

Data is updated daily from Repology and indexed for instant local lookups. On first run, pkgmap automatically downloads and decompresses the latest daily database release (~/.cache/pkgmap/pkgmap.db).

The package is available on PyPI as pkgmap-py.


CLI Usage

Translate between distributions

Use --from (-f) and --to (-t):

# What is Arch's 'bat' called in Debian?
pkgmap resolve bat --from arch --to debian
# Output: rust-bat (0.22.1) [category: misc]

# What is Arch's 'fd' in Nixpkgs?
pkgmap resolve fd -f arch -t nixpkgs
# Output: fd (10.5.0)

Resolve across all distributions

Omit --to to see equivalents across every indexed distribution:

pkgmap resolve bat --from arch

Output:

alpine_3_20: bat (0.24.0)
debian_12: rust-bat (0.22.1) [category: misc]
fedora_rawhide: rust-bat (0.26.1)
nix_unstable: bat (0.26.1)
ubuntu_24_04: rust-bat (0.24.0)
...

Look up by upstream project name

Omit --from (or pass --project / -p) to resolve packages directly from an upstream project name:

pkgmap resolve ripgrep --to debian
# Output: rust-ripgrep (13.0.0) [category: misc]

JSON output

To output machine-readable JSON (great for automation and scripts), add --json / -j:

pkgmap resolve bat -f arch -t debian --json
[
  {
    "name": "rust-bat",
    "version": "0.22.1",
    "repo": "debian_12",
    "repo_family": "debuntu"
  }
]

Other commands

# List available distributions and repository slugs
pkgmap repos

# Manually refresh the local database snapshot
pkgmap update

Python API

You can also use pkgmap as a Python library:

from pkgmap import resolve, resolve_all, resolve_batch

# 1. Single package resolution
res = resolve("bat", from_repo="arch", to_repo="debian")
if res:
    print(res.name, res.version)
    # Output: rust-bat 0.22.1

# 2. Query all repositories for equivalents
matches = resolve_all("bat", from_repo="arch")
for r in matches:
    print(f"{r.repo}: {r.name}")

# 3. High-performance batch resolution (executed in a single SQL query)
packages = ["bat", "fd", "ripgrep"]
results = resolve_batch(packages, from_repo="arch", to_repo="nixpkgs")

for pkg, match in results.items():
    if match:
        print(f"{pkg} -> {match.name}")

API Methods

  • resolve(package, from_repo=None, to_repo=None, db_path=None): Resolves a package to a single match.
  • resolve_all(package, from_repo=None, to_repo=None, db_path=None): Returns all matching packages.
  • resolve_batch(packages, from_repo=None, to_repo=None, db_path=None): Resolves a sequence of packages in a single batch query, returning {package: PackageResolution | None}.
  • resolve_batch_all(packages, from_repo=None, to_repo=None, db_path=None): Batch resolution returning {package: list[PackageResolution]}.
  • list_repositories(db_path=None): Returns all repositories with package counts and families.

Configuration

By default, the database is stored at:

  • ~/.cache/pkgmap/pkgmap.db

You can customize the location using:

  • The PKGMAP_DB_PATH environment variable:
    export PKGMAP_DB_PATH="/path/to/custom/pkgmap.db"
    
  • Or the --db-path argument on the CLI / db_path parameter in Python.

Attribution

Data is sourced daily from Repology. Repology's data is published under the CC-BY-SA 4.0 license.

Metadata

Release files for pkgmap-py 0.1.1

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

Source distribution (sdist)

Source distribution for pkgmap-py 0.1.1
File Size Uploaded
pkgmap_py-0.1.1.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pkgmap-py 0.1.1
File Interpreter ABI Platform
pkgmap_py-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 29.7 kB

Release files / pkgmap_py-0.1.1.tar.gz

Download URL pkgmap_py-0.1.1.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
16215177c7b701b3d0a74259bf8405652a40189d5a213da65521a220e88afb00
BLAKE2b-256 checksum
How to use checksums
8202a2be3cf67dec0bf85fd232ae4fdca247daa437ca9cfca6e9c4db6ba36bff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / pkgmap_py-0.1.1-py3-none-any.whl

Download URL pkgmap_py-0.1.1-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d4a73826ba7da38fe7c29795a7d50b09891d9a3b229f1d509c9e0104ee89bbb
BLAKE2b-256 checksum
How to use checksums
c143ed360a20407564202c43da46f228e083c9871d89800b7893e07f7c87c7ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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