pkgeter v1.3.5
English | 中文
Offline package downloader — supports Debian/apt and RPM/dnf (CentOS, Kylin, RockyLinux, etc.). Resolve dependency trees, download .deb or .rpm files, generate offline install script, or produce a local apt/yum mirror.
Works on any platform (Linux, Windows, macOS) — useful when you need to install packages on an air-gapped or offline machine.
Features
v1.3.5: syncs REPL help with current CLI usage and documents
--repooutput more clearly. v1.3.4 fixed Debian multiarch dependency resolution such aspython3:any, resolving failures likeopenvswitch-switchonpve-8.
- Dual backend — supports Debian (
dpkg) and RPM (rpm/dnf/yum) based distributions - Distribution presets — 14+ ready-to-use presets:
--distro debian-bookworm,--distro centos-7,--distro ubuntu-noble - Interactive REPL — run
pkgeterwith no arguments to enter a switch-style CLI with prefix matching and TAB completion - Multi-repo merge — automatically combines repositories (e.g., main + security, BaseOS + AppStream + EPEL)
- Dependency resolution — recursively resolves all dependencies for the target packages
- Virtual package resolution — follows
Providesfields for virtual dependencies with interactive provider selection - Skip installed packages — optionally provide a
dpkg -l/rpm -qaoutput to skip already-installed packages - SHA256 verification — validates every downloaded
.debor.rpmfile - Source caching — caches repository metadata with SHA256 validation (SQLite-backed), only re-downloads when changed
- Local mirror output —
--repoflag generates a fully structured apt repo (Packages.gz+Release) or yum repo (repomd.xml+ metadata) - Dependency tree visualization —
--treeflag generates an interactive HTML dependency tree - Offline install script — auto-generates
install.shthat runsdpkg -iorrpm -ivhin dependency order (auto-detects sudo) - Multiple mirrors — specify fallback mirrors, tried in order until one succeeds
- Persistent config — preferences saved to
~/.config/pkgeter/config.yaml - Repo management — add, list, and remove custom repositories via
pkgeter repo
Installation
From PyPI (recommended)
pip install pkgeter
From source
git clone https://github.com/mlzxgzy/pkgeter.git
cd pkgeter
pip install -e .
Usage
# Interactive REPL (no arguments)
pkgeter
# Download packages using a distribution preset
pkgeter get -p nginx --distro debian-bookworm
pkgeter get -p nginx --distro centos-9
pkgeter get -p nginx --distro ubuntu-noble
# Short prefix forms work too
pkgeter g -p nginx --distro centos-9
# Generate local apt/yum mirror metadata (instead of flat output)
pkgeter get -p nginx --distro debian-bookworm --repo
# Generate dependency tree HTML report
pkgeter get -p nginx --distro debian-bookworm --tree
# Legacy usage (backward compatible)
pkgeter get -p vim
pkgeter get -p nginx -r bookworm -a amd64
# Specify multiple mirrors (tried in order)
pkgeter get -p nginx -m https://deb.debian.org/debian -m https://ftp.debian.org/debian
# Manage repositories
pkgeter repo list
pkgeter repo add --name myrepo --type deb --url https://example.com/debian --release bookworm
pkgeter repo remove myrepo
# List and apply distribution presets
pkgeter preset list
pkgeter preset apply centos-9
# Specify a custom output directory
pkgeter get -p python3 -o ./my-output
Output Formats
Two output modes, controlled by the --repo flag:
| Mode | Flag | Structure | Use Case |
|---|---|---|---|
| Flat (default) | (none) | debs/*.deb + install.sh or rpms/*.rpm + install.sh |
Quick copy + install |
| Mirror | --repo |
pool/, dists/, Packages.gz, Release (deb) or Packages/, repomd.xml (rpm) |
Add as permanent apt/yum source |
For Debian mode, all .deb files are placed in a debs/ subdirectory. For RPM mode, all .rpm files are placed in a rpms/ subdirectory. An install.sh script is generated that runs dpkg -i or rpm -ivh in dependency order.
# Debian: copy the debs/ directory and install.sh to the target machine, then:
sudo bash install.sh
# RPM: copy the rpms/ directory and install.sh to the target machine, then:
sudo bash install.sh
Use --repo as a temporary local repository
Generate structured repository output:
pkgeter get -p nginx --distro debian-bookworm --repo -o ./offline-repo
pkgeter get -p nginx --distro centos-9 --repo -o ./offline-repo
On target machine, point package manager at copied directory.
Debian / apt
sudo mkdir -p /opt/offline-repo
sudo cp -r offline-repo/* /opt/offline-repo/
echo "deb [trusted=yes] file:/opt/offline-repo ./" | sudo tee /etc/apt/sources.list.d/offline.list
sudo apt update
sudo apt install nginx
RPM / dnf
sudo mkdir -p /opt/offline-repo
sudo cp -r offline-repo/* /opt/offline-repo/
sudo tee /etc/yum.repos.d/offline.repo <<'EOF'
[offline]
name=Offline Repo
baseurl=file:///opt/offline-repo
enabled=1
gpgcheck=0
EOF
sudo dnf makecache
sudo dnf install nginx
Remove temporary source after use:
# Debian / apt
sudo rm -f /etc/apt/sources.list.d/offline.list
# RPM / dnf
sudo rm -f /etc/yum.repos.d/offline.repo
Configuration
pkgeter stores persistent preferences at ~/.config/pkgeter/config.yaml. This file is automatically created when you run the tool.
backend: debian
arch: amd64
repos:
- name: debian-main
type: deb
url: https://deb.debian.org/debian
release: bookworm
- name: debian-security
type: deb
url: https://security.debian.org/debian-security
release: bookworm-security
CLI flags override config file values. Apply a preset to quickly populate the config:
pkgeter preset apply centos-9
To add or override repositories in a built-in preset, create ~/.config/pkgeter/custom-presets.yaml. This file is optional and merged onto built-in presets by preset name, repo name, and mirror name.
pve-8:
repos:
- name: ceph-squid
type: deb
url: https://download.proxmox.com/debian/ceph-squid
release: bookworm
components: [no-subscription]
mirrors:
- name: cn
provider: ustc
urls:
ceph-squid: https://mirrors.ustc.edu.cn/proxmox/debian/ceph-squid
After editing custom-presets.yaml, re-run pkgeter preset apply <preset> to persist the merged repo list into config.yaml.
How It Works
- Download package database — fetches metadata from configured repositories (Packages.gz for Debian, repomd.xml + primary.xml.gz for RPM)
- Parse dependency tree — recursively resolves all required packages (handles AND/OR deps, virtual packages, cycle detection)
- Download package files — downloads each package with SHA256 verification
- Generate output — creates
debs/orrpms/directory withinstall.sh, or full mirror structure when--repois used
Distribution Presets
| Preset | Backend | Included Repositories |
|---|---|---|
debian-bookworm |
apt (deb) | main, security, updates |
debian-bullseye |
apt (deb) | main, security, updates |
debian-trixie |
apt (deb) | main, security, updates |
debian-buster |
apt (deb) | main, security, updates |
debian-stretch |
apt (deb) | main, security, updates |
ubuntu-noble (24.04) |
apt (deb) | main, universe, security, updates |
ubuntu-jammy (22.04) |
apt (deb) | main, universe, security, updates |
ubuntu-focal (20.04) |
apt (deb) | main, universe, security, updates |
ubuntu-bionic (18.04) |
apt (deb) | main, universe, security, updates |
centos-9 |
rpm | BaseOS, AppStream, EPEL |
centos-7 |
rpm | base, extras, updates, EPEL |
pve-8 |
apt (deb) | bookworm main, security, updates + pve-no-subscription + ceph-squid |
kylin-V10 |
rpm | base, updates |
License
MIT
Metadata
Release files for pkgeter 1.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pkgeter-1.3.5.tar.gz | 162.8 kB | With provenance | Details for pkgeter-1.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pkgeter-1.3.5-py3-none-any.whl | Python 3 | none | any | Details for pkgeter-1.3.5-py3-none-any.whl |
Total release size: 324.8 kB
Release files / pkgeter-1.3.5.tar.gz
| Download URL | pkgeter-1.3.5.tar.gz |
|---|---|
| Size | 162.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd89605a12efbd23a74e53e8680011fd609c249b1265149fa4ce82c86b15f89b
|
|
BLAKE2b-256 checksum How to use checksums |
23829d83573d6bf8e10e3eeb50d94dd1e4bd5ae9ca138378a9b80b84883d0225
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logRelease files / pkgeter-1.3.5-py3-none-any.whl
| Download URL | pkgeter-1.3.5-py3-none-any.whl |
|---|---|
| Size | 162.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9af19edbeb4003843ae12873d86ee442bcba27df614aab524a8d61ddbc49110
|
|
BLAKE2b-256 checksum How to use checksums |
c6d6bb91520090ee2ee2c6d4c51d081c0425422abf67f4cfb81d9e6b14278d39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 9, 2026.
Transparency logSecurity for pkgeter 1.3.5
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.
Attestation for pkgeter-1.3.5.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 Jul 9, 2026.
Transparency logA 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.