Skip to content

Instantly share code, notes, and snippets.

@mcsgeek
mcsgeek / 00 README.md
Last active May 22, 2026 14:39 — forked from imthenachoman/00 README.md
Debian snapper apt script to include full apt command including arguments as snapshot description

This gist includes an enhancement to Debian's snapper package.

The current (as of 2023-07-23) snapper package includes an apt configuration that will automatically take snapper snapshots when you use apt to install/remove/etc. It will add use "apt" as the description of the pre/post snapshot.

With the below changes to the /etc/apt/apt.conf.d/80snapper file and associated dpkg-pre-post-snapper.sh file, snapper will include the full apt command, including the arguments, in the snapshot description.

Updated on 5/5/2026 to support apt, apt-get, and plasma-discover PIDs.

Updated on 5/22/2026 to append Architectures: amd64 to the end of the google-chrome apt sources list when replaced with an update, but ignores if google chrome is not installed or is unchanged.