Offline package downloader - support Debian/apt and RPM/dnf, resolve deps, download packages, generate offline install script
Project description
pkgeter v1.1
English | 中文
Offline package downloader — supports Debian/apt and RPM/dnf (CentOS Stream). Resolve dependency trees, download .deb or .rpm files, and generate an offline install script.
Works on any platform (Linux, Windows, macOS) — useful when you need to install packages on an air-gapped or offline machine.
Features
- Dual backend — supports Debian (
dpkg) and RPM (rpm) based distributions - Distribution presets — one-command selection:
--distro debian-bookworm,--distro centos-9 - 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
- Skip installed packages — optionally provide a
dpkg -loutput to skip already-installed packages - SHA256 verification — validates every downloaded
.debor.rpmfile - Source caching — caches repository metadata with SHA256 validation (like APT), only re-downloads when changed
- Offline install script — auto-generates
install.shthat runsdpkg -iorrpm -ivhin dependency order - 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 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 debian-bullseye
# Short prefix forms work too
pkgeter g -p nginx --distro centos-9
# 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
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
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
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
- Download package files — downloads each package with SHA256 verification
- Generate output — creates
debs/orrpms/directory withinstall.sh
Distribution Presets
| Preset | Backend | Included Repositories |
|---|---|---|
debian-bookworm |
deb | main, security, updates |
debian-bullseye |
deb | main, security, updates |
debian-trixie |
deb | main, security, updates |
centos-9 |
rpm | BaseOS, AppStream, EPEL |
pve8 |
deb | bookworm main, security, updates + pve-no-subscription |
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pkgeter-1.1.0.tar.gz.
File metadata
- Download URL: pkgeter-1.1.0.tar.gz
- Upload date:
- Size: 158.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d51d3835656e894414b2ef82213bcba012478c422da6a71e7cb29430843ac07c
|
|
| MD5 |
995a12ed840f708304d290340703dcd0
|
|
| BLAKE2b-256 |
95b68af178a1c37af2706cb9610e1b0979f124082d361d56bf70cabef2fefd2e
|
Provenance
The following attestation bundles were made for pkgeter-1.1.0.tar.gz:
Publisher:
python-publish.yml on mlzxgzy/pkgeter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pkgeter-1.1.0.tar.gz -
Subject digest:
d51d3835656e894414b2ef82213bcba012478c422da6a71e7cb29430843ac07c - Sigstore transparency entry: 1689406446
- Sigstore integration time:
-
Permalink:
mlzxgzy/pkgeter@caa4603887d991f95d5ad68b9802ec695219d537 -
Branch / Tag:
refs/tags/v1.1 - Owner: https://github.com/mlzxgzy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@caa4603887d991f95d5ad68b9802ec695219d537 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pkgeter-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pkgeter-1.1.0-py3-none-any.whl
- Upload date:
- Size: 158.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2c4c9a0ac223feafbd68fbc69561dac21c58377971a1cdaeabd03005bef0cb2
|
|
| MD5 |
eb7321b6db528cd2f36af7b1243a56ef
|
|
| BLAKE2b-256 |
7089b8835b699201b333543ab8fe82ae0b765502eddbaa4696a4f5d2e2a6a47b
|
Provenance
The following attestation bundles were made for pkgeter-1.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on mlzxgzy/pkgeter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pkgeter-1.1.0-py3-none-any.whl -
Subject digest:
a2c4c9a0ac223feafbd68fbc69561dac21c58377971a1cdaeabd03005bef0cb2 - Sigstore transparency entry: 1689406540
- Sigstore integration time:
-
Permalink:
mlzxgzy/pkgeter@caa4603887d991f95d5ad68b9802ec695219d537 -
Branch / Tag:
refs/tags/v1.1 - Owner: https://github.com/mlzxgzy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@caa4603887d991f95d5ad68b9802ec695219d537 -
Trigger Event:
release
-
Statement type: