apt-offline(8)
π apt-offline(8) β USER COMMANDS π
okay bestie, sit down, hydrate, because we're about to make offline package management your whole personality. this is the manual for apt-offline, and it's genuinely iconic, no cap. π«Ά
β¨ NAME β¨
apt-offline β Offline APT Package manager
like, the offline era of APT. it's giving "no wifi, still slaying". π
πΈ SYNOPSIS πΈ
apt-offline [ARGUMENTS] [OPTIONS]
π¦ DESCRIPTION π¦
apt-offline brings offline package management functionality to Debian based system. yes, fr fr β you can download packages and its dependencies to be installed later on (or required to update) a disconnected machine. and the download? it happens from a different connected machine. main character energy: one laptop has internet, the other one is living its cozy offline life. π₯
it can also fetch bug reports for the packages that are downloaded. because knowing what broke is part of the vibe check. π
okay but real talk: unless the-h/-vor--help/--versionoptions are given, one of theget,setorinstallcommands must be provided. like, you have to pick a lane, bestie.
π set β the signature-making era
set FILENAME [-h] [--install-packages PKG...PKG_N] [--install-src-packages
PKG...PKG_N] --src-build-dep [--release release_name] [--update]
[--upgrade] [--upgrade-type upgrade]
set generates a signature file with the data required to install on or update the disconnected machine. it's literally the little note you write so the connected machine knows what to bring back. π
FILENAME {apt-offline.sig} is the signature file generated on the machine. This file will contain all the information necessary for apt. like, everything apt needs to know, packed into one file. obsessed.
--simulateβ Developer only. Used for testing. not for us, that's a dev thing. π--install-packages [PKG...PKG_N]β Packages that need to be installed. yes, list them all, go off. β¨--install-src-packages [PKG...PKG_N]β Source packages that need to be installed. the source-code girlies get their moment too. π--src-build-depβ Download Build Dependency packages for the source packages requested. build deps said "we're coming too". periodt.--release release_nameβ Release target to install packages from. pick your era, release_name. β--apt-backend apt-getβ APT backend to use. One of:apt,apt-get,python-apt. choose your fighter.--generate-changelogβ Generate changelog of the version to be downloaded. the receipts, the lore, the whole story. π--updateβ Generate APT Database signature for an update. This is the equivalent of usingapt-get update. lowkey essential.--upgradeβ Generate APT Database signature for package upgrade. This is the equivalent of usingapt-get upgrade. glow-up time. π--upgrade-type {upgrade_type}β Type of upgrade you would like to perform. Default isupgrade. Other valid types aredist-upgradeanddselect-upgrade. so many upgrades, so little time.
π§ get β the download arc
get FILENAME [-h] [--socket-timeout ] [-d / --download-dir] [-s / --cache-
dir] [--no-checksum] [-t / --threads ] [--bundle] [--bug-reports]
[--proxy-host] [--proxy-port] [--https-cert-file --https-key-file]
[--http-basicauth] [--disable-cert-check]
get downloads APT data as per a signature file. it reads the note from set and goes shopping. ποΈ
FILENAME {apt-offline.sig} is the signature file required for details about data to be downloaded. This file should have been generated by the above set command. so like, set first, then get. that's the order, bestie, don't fight it.
-d,--download-dirDIR_NAME β Download data to the specified DIR_NAME folder. If no folder name is specified, data is downloaded to a folder in theTEMPDIRpath in the formatapt-offline-download-$PID. so it's not lost, it's just... vibing in temp. ποΈ-s,--cache-dirDIR_NAME β Look for data in the cache before downloading it from the internet. If you are on a Debian box, you would want to specify/var/cache/apt/archiveshere. If the data is not available in the cache, the downloaded data is also copied to the cache. reuse, recycle, slay. β»οΈ--no-checksumβ Enabling this option will bypass the checksum verification of each downloaded file thus losing integrity of the package. Usage of this option is highly discouraged.
π¨ bestie NO. this one is literally the "trust me bro" option. integrity of the package gets lost, and the manpage itself says usage is highly discouraged. do not.
-t,--threadsNUM_OF_THREADS β Number of threads to spawn for downloads. Default is1. Using too many threads can overload the servers, hence it is advisable to keep the number low. more threads β more iconic. be polite to the servers. π§--bundleFILENAME β Create an archive file FILENAME. The file is archived in zip format. one file to carry them all. π--bug-reportsβ Download bug reports for packages that are being downloaded. Currently only the Debian BTS is supported. it's giving "we also grabbed the drama". π--proxy-hostβ Specify the Proxy Host to be used.--proxy-portβ Specify the Proxy port number to be used.--https-cert-fileFILENAME β The Certificate-file to use if https-client-authentication is required on one or multiple hosts.--https-key-fileFILENAME β The Certificate-key-file to use if https-client-authentication is required on one or multiple hosts.--disable-cert-checkβ Disable the check of https certificates on servers. the security girlies are side-eyeing this one, ngl. π--http-basicauthURL β A username/password encoded in the URL. Note Passwords with special characters should be percent encoded as per RFC-3986 section 2.1. yes, the RFC said so. look it up. π
π install β the moment it all comes together
install FILE/FOLDER [-h] [--skip-bug-reports ] [--install-src-path PATH]
[--allow-unauthenticated]
install installs APT data to the APT package database and updates it. the grand finale. the payoff. the "we did it Joe". π
FILE {archive_bundle_file} Install data from the archive (bundle) file.
FOLDER {/folder/path} Install data from the folder path.
Either FILE or FOLDER argument can be provided to the install command. one or the other, bestie, pick your entrance. πͺ
--simulateβ Developer only. Used for testing. again, devs only. π--skip-bug-reportsβ Skip listing of downloaded bug reports, if any. not in the mood for drama today? valid.--skip-changelogβ Skip display of changelog, if any. skipping the lore, respectfully.--allow-unauthenticatedβ Don't verify GPG signatures for the data to be installed to APT. Usage of this option is highly discouraged.
π¨ another "highly discouraged" one!! no GPG signature verification = no proof of where this came from. the manpage is literally begging you. do not, bestie.
--strict-deb-checkβ With this option enabled,apt-offlinedelegate's.debpackage checksum validation to apt. While the.debsare already available, they are stored in the temporary apt cache, where apt validates its checksum, before considering it for further processing.
Note: This does have the caveat that apt may need network availability even though it doesn't download anything over the network. But it does invoke the download routines and realizes that the payload is already available. It then further proceeds with checksum validation.
The default behavior is to not do strict checksum validation for .deb files. Instead, apt-offline copies the .deb files to apt's download location. apt still does size validation of the available .deb files and discards them in case there is a mismatch.
so like, "network needed but nothing downloaded"? yes, that's the caveat, and we're being honest about it. π
--install-src-pathPATH β Path to filesystem where we want the source packages to be installed to. Default will be a folder in yourTEMPDIR. source packages get a home. π‘
π GLOBAL OPTIONS π
-h,--helpβ Show help message. the "explain it to me again" button, but make it official.--verboseβ Run in verbose mode. it will tell you everything. it will not shut up. we love it. π¬-v,--versionβ Display the version of the program. the "who even are you" option. β
more of this iconic manual is coming, bestie β don't go anywhere π«Ά
π« EXAMPLES π«
NOTE: argument/option handling, bestie, listen up π
apt-offline leans on argparse for all its argument/option parsing. So if you wanna be super explicit about what's an argument, you can yeet it across with the -- delimiter.
Example:
apt-offline set --update --upgrade --install-packages wm2 -- foo.sig
By dropping that -- delimiter in there, we're telling apt-offline that foo.sig is an argument to the apt-offline command itself, and NOT a value for the --install-packages option. iconic behaviour, honestly.
Otherwise? You can just put it positionally right next to the set command instead:
apt-offline set foo.sig --update --upgrade --install-packages wm2
πΈ apt-offline set FILENAME
This command generates a signature file FILENAME for the APT Package Database. Genuinely the first step of the whole glow-up β¨.
- Wanna generate only the signature for updates? Use the
--updateoption. - Wanna generate only the signature for package upgrades? Use the
--upgradeoption.
π¦ apt-offline get FILENAME
This command fetches all the data the APT Package Database needs, following the signature file FILENAME that was generated by apt-offline get. Yes bestie, it said apt-offline get in the original, we don't fix what we didn't write π
.
- Wanna pull down bug reports too? Use the
--bug-reportsoption. Currently the only bug tracker supported is Debian BTS. That's it, that's the list. - By default β like, if neither
-dnor the--bundleoptions are specified βapt-offlinedownloads data into a folder inside theTEMPDIRenvironment folder, in the formatapt-offline-downloads-PID, where PID is the PID of the runningapt-offlineprocess. So on a Linux machine it'd look something like:
/tmp/apt-offline-downloads-23242/
π apt-offline install FILE|FOLDER
This command syncs the data you downloaded with apt-offline get back into the APT Package Database and updates it. Depending on where the data was downloaded to or packed into, you can hand it either the absolute FOLDER path or the archive FILE path. Either one, she's flexible πββοΈ.
NOTE1: On a freshly installed box β one that got installed without the network β the package database is null. Nothing in it. Empty. In that case, you first need to runapt-offlinewith just the--updateoption to make sure you have a meaningful package database.
Example:
apt-offline set set.uris --update
NOTE2: On a fresh setup installed through CD/DVD, the default APT setting lists only the install media URLs. In that case you need to add the default APT network repositories to the list. For example, for a fresh (DVD) installed Debian box, add the relevant repository to
/etc/apt/sources.list.d/apt-offline.list or /etc/apt/sources.list
deb https://deb.debian.org/debian stable main contrib
(For Debian Stable)
deb https://deb.debian.org/debian unstable main contrib
(For Debian Unstable/Sid)
deb https://deb.debian.org/debian stretch main contrib
(For Debian Stretch)
deb http://security.debian.org stable/updates main contrib
(Security Updates for Debian Stable)
deb http://security.debian.org testing-security/updates main contrib
(Security Updates for Debian Testing)
π Sequence 1
The following set of commands, when run in sequence, will update a disconnected machine. Periodt. No internet required on the target box π₯.
apt-offline set update.sig --update
(Generate the required data needed to update the APT database. Should be run on the disconnected machine)
apt-offline get update.sig --bundle update.zip
(Download the required data needed to update the APT database. Should be run on a machine with internet connectivity)
apt-offline install update.zip
(Installs the data needed to update the APT database. Should be run on the disconnected machine)
π§ Sequence 2
With successful completion of Sequence 1, the APT database on the disconnected machine will be up-to-date. Now, the following set of commands, when run in sequence, will upgrade a disconnected machine. Main character energy, honestly π.
apt-offline set upgrade.sig --upgrade
(Generate the required data needed to upgrade the upgradable packages. Should be run on the disconnected machine)
apt-offline get upgrade.sig --bundle upgrade.zip
(Download the required data needed to upgrade the upgradable packages. Should be run on a machine with internet connectivity)
apt-offline install upgrade.zip
(Installs the data needed to upgrade the upgradable packages. Should be run on the disconnected machine)
After successful completion of Sequence 1 and Sequence 2 in order, further running apt-get upgrade will result in 0 bytes of additional download. Zero. Zilch. Nothing. slay π
β¨
β¨ AUTHOR β¨
apt-offline is written by Ritesh Raj Sarraf (rrs@researchut.com).
If you wish to report a bug in apt-offline, please see https://github.com/rickysarraf/apt-offline or else, send an email to me at rrs@researchut.com. Bestie, the maintainer is literally reachable, use it π«Ά
πΈ SEE ALSO πΈ
apt-get(8), apt-cache(8), dpkg(8), aptitude(8),
π DEDICATION π
This software is dedicated to the memory of my father Santosh Kumar Sarraf. We miss you a lot. ποΈ
okay that's the whole page bestie, you ate it up π
This one's apt-offline version 1.8.6, dated February 08, 2025 β go forth and offline-install something, queen πβ¨
π¦ where this page comes from
- debian trixie: apt-offline 1.8.6-1
- nixpkgs unstable: apt-offline 1.8.6
- ubuntu questing: apt-offline 1.8.6-1
- ubuntu resolute: apt-offline 1.8.6-1build1
- ubuntu stonking: apt-offline 1.8.6-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms