Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

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 snapshot (~/.cache/pkgmap/).


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.24.0)

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

Batch resolution

Pass multiple package names to resolve them in a single query:

pkgmap resolve git gcc bat --from nix --to gnuguix

Output:

git -> git (2.54.0)
gcc -> gcc (15.2.0)
bat -> bat (0.26.1)

Resolve across all distributions

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

pkgmap resolve bat --from arch

Output:

alpine_edge: bat (0.24.0)
debian_unstable: rust-bat (0.24.0)
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 (14.1.0)

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.24.0",
    "repo": "debian_unstable",
    "repo_family": "debuntu"
  }
]

When multiple packages are passed with --json, the output is a dictionary keyed by each input package name.

Other commands

# List available distributions and repository slugs
pkgmap repos

# Manually refresh the local database snapshot
pkgmap update

# Download the full database (all 330+ Repology repositories)
pkgmap update --full

Core vs. Full Database Variants

pkgmap publishes two database snapshots with every daily release:

Variant File Compressed Size Coverage Default For
Core pkgmap-core.db ~12 MB Top 10 repositories (Nixpkgs, Arch, AUR, Debian, Ubuntu, Fedora, Alpine, openSUSE, Gentoo, Void) CLI & Web UI
Full pkgmap.db ~40 MB All 330+ Repology repositories Python Library
  • CLI behavior: Defaults to the Core database (~/.cache/pkgmap/pkgmap-core.db) unless the Full database is already downloaded locally or --full is passed. If you query a repository not present in Core, the CLI prompts you to run pkgmap update --full. You can also pass --core or --full to any CLI command (resolve, update, repos).
  • Python library behavior: Defaults to the Full database (~/.cache/pkgmap/pkgmap.db). Call set_default_variant("core") (or set PKGMAP_DB_VARIANT=core) to use the Core database instead.

Python API

You can use pkgmap as a Python library:

from pkgmap import resolve, resolve_all, resolve_batch, set_default_variant

# Optional: switch library default from 'full' to 'core'
# set_default_variant("core")

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

# 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.
  • set_default_variant(variant): Sets the default database variant ("full" or "core").
  • get_default_variant(): Returns the active default database variant.

Configuration

By default, databases are cached at:

  • Full database: ~/.cache/pkgmap/pkgmap.db
  • Core database: ~/.cache/pkgmap/pkgmap-core.db

You can customize behavior using environment variables:

  • PKGMAP_DB_VARIANT: Set to core or full to override the default database variant.
  • PKGMAP_DB_PATH: Override the database file path directly:
    export PKGMAP_DB_PATH="/path/to/custom/pkgmap.db"
    
  • Or pass --db-path on the CLI / db_path 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.2.1

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

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for pkgmap-py 0.2.1
File Size Uploaded Provenance Actions
pkgmap_py-0.2.1.tar.gz 17.8 kB With provenance Details for pkgmap_py-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 39.2 kB

Release files / pkgmap_py-0.2.1.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pkgmap_py-0.2.1.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
22423248f50033789007773c13a90afe89d75191acb9059cb41f1c614cb3e745
BLAKE2b-256 checksum
How to use checksums
6951f6e3cd8b4bacd244e45651ff146b61906c84ef34fe6453b0b0bfb153381e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 26, 2026.

Transparency log

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

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pkgmap_py-0.2.1-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bc11f9ff79c190d8157a16d4701ae5fab7fb32ede7b534492896be1b846d723
BLAKE2b-256 checksum
How to use checksums
00d13f1eaef788ae97370f70fd3b70a1be1fe5a1f943e0d3b8e7352bd2fd9db6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 26, 2026.

Transparency log

Security for pkgmap-py 0.2.1

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.

Change of provenance

The configuration that created this release differs from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for pkgmap_py-0.2.1.tar.gz

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 26, 2026.

Transparency log

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