Skip to main content

debkit

Command-line tool for building, inspecting, and mirroring Debian package repositories on a local filesystem, S3-compatible object storage, or HTTP(S) servers, with GPG-signed Release files, streamed checksum verification, and transactional writes you can revert.

Current version: 0.1.0. Planned work → ROADMAP.md.

Capabilities

  • Inspect a repository: dump, list, stats; verify consistency with check and repair with check --fix.
  • Insert packages from a .changes upload or a single .deb; remove packages by field pattern.
  • Mirror a repository with sync: architecture and index filters, source packages, indices-only mode, Release freshness checks, and optional re-verification of existing packages.
  • Transactional writes on fs:// and s3:// targets, with log, revert of the latest change, and prune of old history.
  • GPG verification and signing of Release and InRelease; checksum verification against every index.
  • Every option as a flag or a DEBKIT_* environment variable, for CI pipelines.
  • Storage through txstore: fs, s3, and read-only http/https.

Quick start

Installation

Released versions are published to PyPI. Prerequisites → SETUP.md. Other examples → Quick how-to.

pip install debkit

Example: working with a remote repository (Debian bookworm)

GPG setup for repository

debkit verifies the repositories it reads against trusted keys by default. Import every key that signs it. Bookworm's carries three (its archive key, the trixie archive key, and its stable release key):

export DEBKIT_GNUPG_HOME="$HOME/.debkit-gnupg"
mkdir -m 700 -p "$DEBKIT_GNUPG_HOME"
curl -sS https://ftp-master.debian.org/keys/{archive-key-12,archive-key-13,release-12}.asc | \
    gpg --homedir "$DEBKIT_GNUPG_HOME" --no-default-keyring --keyring trustedkeys.gpg --import

Operating with a remote repository

# stats of a remote repository
debkit --target-url "https://deb.debian.org/debian bookworm main" stats
# list packages in a repository
debkit --target-url "https://deb.debian.org/debian bookworm main" list
# mirror a remote repository into `/srv/repo`
debkit --target-url "/srv/repo bookworm main" sync \
    --source-url "https://deb.debian.org/debian bookworm main" \
    --indices-only

Example: building a local repository from a .deb

GPG setup for local repository

export DEBKIT_GNUPG_SIGN_KEY="repo@example.com"
gpg --homedir "$DEBKIT_GNUPG_HOME" --batch --passphrase '' \
    --quick-gen-key "Repo signing <$DEBKIT_GNUPG_SIGN_KEY>"
gpg --homedir "$DEBKIT_GNUPG_HOME" --export "$DEBKIT_GNUPG_SIGN_KEY" | \
    gpg --homedir "$DEBKIT_GNUPG_HOME" --no-default-keyring --keyring trustedkeys.gpg --import

Building a local repository

debkit signs the repository with the key DEBKIT_GNUPG_SIGN_KEY. The key generated above has no passphrase, which suits a local demo only; protect a real one and pass DEBKIT_GNUPG_PASSPHRASE.

debkit --target-url "/srv/repo bookworm main" \
    insert --incoming-url ./incoming --deb-filename hello_1.0_amd64.deb
debkit --target-url "/srv/repo bookworm main" list
debkit --target-url /srv/repo log

Documentation

Location Audience Authority
/ root contract documents Developers and AI agents Canonical
docs/guides/ Anyone operating the CLI Non-canonical how-tos and examples
docs/development/ Developers and contributors Non-canonical diagrams, code maps, explanations

Domain owners and agent navigation → AGENTS.md.

Technology

Python and txstore; runtime dependencies → STRUCTURE.md. Tests and gates use pytest, Ruff, and mypy → SETUP.md.

License

MIT → LICENSE.

Metadata

Release files for debkit 0.1.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 debkit 0.1.0
File Size Uploaded Provenance Actions
debkit-0.1.0.tar.gz 409.8 kB With provenance Details for debkit-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 510.9 kB

Release files / debkit-0.1.0.tar.gz

Download URL debkit-0.1.0.tar.gz
Size 409.8 kB
Tags Source
SHA-256 checksum
How to use checksums
17ea15b631747ec99ab7511bd43f183b6787e9aabcade86f820cccd16dba226b
BLAKE2b-256 checksum
How to use checksums
5a0b7b4b12b319fafaca467dcf124c95bd4099549e393a7bf4eecdeeb0ccb0d6
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 Nov 12, 2026.

Transparency log

Release files / debkit-0.1.0-py3-none-any.whl

Download URL debkit-0.1.0-py3-none-any.whl
Size 101.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2dd9068d9211f551c5469eb4a4c1a18f8ceed2e6ff9863d8e88fd420f9ac285d
BLAKE2b-256 checksum
How to use checksums
794f4eba61247a50bbc2b39420e5a02c41a773fff741197f95147211c9597639
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 Nov 12, 2026.

Transparency log

Security for debkit 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for debkit-0.1.0.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 Nov 12, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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