apt-clone
Backup and restore installed package states
TLDR
SYNOPSIS
apt-clone command [options]
DESCRIPTION
apt-clone creates and restores backups of the installed package state on Debian-based systems. It captures information about installed packages, their versions, and repository sources, enabling system migration or recovery.Clone files are compressed tar archives containing package lists and APT source configurations. This allows replicating a system's software configuration on another machine or after a fresh installation.
PARAMETERS
--source path
Specify an alternative source directory for cloning (default is /).--destination path
Specify the destination directory for restore (debootstraps the clone into this directory).--with-dpkg-repack
Include package files for packages no longer available in repositories.--with-dpkg-status
Include the full dpkg status file.-h, --help
Show help message and exit.--debug
Enable debug output.
SUBCOMMANDS
clone destination
Create a clone file of the current package state into the specified destination directory.restore source [--destination path]
Restore packages from a clone file. Optionally debootstrap into a specific directory.restore-new-distro source newdistrocodename
Restore a clone file while attempting to upgrade packages to a new distribution release.info source
Display information about a clone file.
CAVEATS
Restoring a clone on a different release version may fail due to package incompatibilities; use restore-new-distro for cross-release restores. The clone and restore operations require root privileges. An active internet connection is needed to download packages during restore. Packages not available in configured repositories will be skipped unless --with-dpkg-repack was used during cloning.
