A tool that resolves all Debian package dependencies needed to install a given set of Debian packages behind an air gap.
aptprep enables air-gapped Debian package installations by:
- Resolving dependencies - Creates a lockfile with all transitive dependencies resolved from Debian repositories
- Downloading packages - Downloads all packages specified in the lockfile with integrity verification
The lockfile ensures reproducibility by pinning exact package versions, allowing you to recreate the same package set across different environments. This is especially useful for air-gapped environments where direct access to package repositories is not available.
Download the latest release from the releases page and extract:
tar -xzf aptprep-linux-x86_64.tar.gz
chmod +x aptprepFor every commit on main and every commit in pull requests targeting main, GitHub Actions publishes a downloadable snapshot artifact from the Snapshot Build workflow.
Download it from the workflow run's Artifacts section.
cargo build --releaseThis project uses automated code formatting. To set up:
- Install dependencies:
pnpm install - Configure git to use in-repo hooks:
git config core.hooksPath .githooks
The pre-commit hook will automatically format:
- Rust code with
rustfmt - Bazel files with
buildifier - Config files with
prettier
Use the format script: ./scripts/format.sh
aptprep works with a configuration file (default: config.yaml) that specifies:
- Source repositories (Debian mirrors)
- Target packages to install
- Architectures to support
Resolve all dependencies and create a lockfile:
aptprep lock --config config.yaml --lockfile aptprep.lockDownload all packages from the lockfile:
aptprep download --config config.yaml --lockfile aptprep.lockThis will download all resolved packages to the output directory specified in your configuration, ready for transfer to an air-gapped environment.
--verbose/-v- Increase logging verbosity (use multiple times for more detail)--config/-c- Specify configuration file (default: config.yaml)--lockfile/-l- Specify lockfile path (default: aptprep.lock)
Run aptprep --help or aptprep <command> --help for detailed options.
The source code for this project is dual-licensed under either of the following licenses, at your option:
Apache-2.0 OR MIT
The full license texts are available in the following files:
- Apache License, Version 2.0: LICENSE-APACHE
- MIT License: LICENSE-MIT
For the licenses of bundled dependencies, please refer to THIRD_PARTY_LICENSES.txt in the binary tar archives.