aptitude-create-state-bundle
Backup and restore installed package state
SYNOPSIS
aptitude-create-state-bundle [<option>...] <filename>
PARAMETERS
-h, --help
Display summary of options and exit.
-n, --no-compressed
Output uncompressed bundle (no bzip2).
-s, --save-installation-order
Include package installation sequence in bundle.
-v, --version
Print version info and exit.
DESCRIPTION
aptitude-create-state-bundle generates a snapshot file capturing the current state of aptitude's package database. It records installed packages with exact versions, architectures, "auto-installed" flags, broken dependencies, and optionally held packages or installation order.
This is invaluable for replicating package states across systems, such as migrating servers, creating reproducible test environments, or backing up installations. The bundle is bzip2-compressed by default for efficient storage and transfer.
Pair it with aptitude-run-state-bundle to restore the state on a target machine. Note that it focuses solely on package database info; user configurations in /etc or /var require separate handling.
CAVEATS
Does not capture config files, user data, or local mods. Target system must have exact package versions available.
Overwriting existing file without backup risks data loss.
TYPICAL USAGE
aptitude-create-state-bundle state.bundle.bz2
Produces default compressed bundle.
aptitude-create-state-bundle -n -s state.bundle
Uncompressed with install order.
FILE FORMAT
Proprietary binary format; human-readable via aptitude-run-state-bundle --print-format.
HISTORY
Added in aptitude 0.4.5 (2006) by Daniel Burrows to enable precise state cloning in Debian ecosystems.
SEE ALSO
aptitude(8), aptitude-run-state-bundle(8), dpkg(1)


