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.1. 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.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 debkit 0.1.1
File Size Uploaded Provenance Actions
debkit-0.1.1.tar.gz 418.0 kB With provenance Details for debkit-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 520.4 kB

Release files / debkit-0.1.1.tar.gz

Download URL debkit-0.1.1.tar.gz
Size 418.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0a81aa7bc3fbf4c053b81821d2b43b98300460621914dd09bf2414b0f5532c1b
BLAKE2b-256 checksum
How to use checksums
a3a00d65a6a7e3955e76cfcf35e11711c9f350684ca1996726e224d90a2e1c89
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 22, 2026.

Transparency log

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

Download URL debkit-0.1.1-py3-none-any.whl
Size 102.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
896f9fc02f1e07d65254f04bc7ca8f89172a25d68c9583a6c266b8edfe764f9c
BLAKE2b-256 checksum
How to use checksums
33bd6aa57d2c07cb9121131f29cd7205e0132ce2c17ca5c0089aa072a3b6530b
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 22, 2026.

Transparency log

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

Full provenance

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

Select from 2 files

Attestation for debkit-0.1.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 Nov 22, 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.1 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