Scroll to navigation



debootsnap - create debian chroot using


usage: debootsnap [-h] [--architecture ARCHITECTURE] [--ignore-notfound]

(--buildinfo BUILDINFO | --packages PACKAGES) [--sources-list-only] [output]

Combines debootstrap and to create a chroot with exact package versions from the past either to reproduce bugs or to test source package reproducibility.

To obtain a list of packages run the following command on one machine:

$ dpkg-query --showformat '${binary:Package}=${Version}\n' --show

And pass the output to debootsnap with the --packages argument. The result will be a chroot tarball with precisely the package versions as they were found on the system that ran dpkg-query.

positional arguments:

path to output chroot tarball


show this help message and exit
native architecture of the chroot. Ignored if --buildinfo is used. Foreign architectures are inferred from the package list. Not required if packages are architecture qualified.
only warn about packages that cannot be found on instead of exiting
use packages from a buildinfo file. Read buildinfo file from standard input if value is "-".
list of packages, optional architecture and version, separated by comma or linebreak. Read list from standard input if value is "-". Read list from a file if value starts with "./" or "/". The option can be specified multiple times. Package name, version and architecture are separated by one or more characters that are not legal in the respective adjacent field. Leading and trailing illegal characters are allowed. Example: pkg1:arch=ver1,pkg2:arch=ver2
only query and print the sources.list needed to create chroot and exit


On one system run:

$ dpkg-query --showformat '${binary:Package}=${Version}\n' --show > pkglist

Then copy over "pkglist" and on another system run:

$ debootsnap --pkgs=./pkglist chroot.tar

Or use a buildinfo file as input:

$ debootsnap --buildinfo=./package.buildinfo chroot.tar
October 2023 debootsnap 2.23.4+deb12u1