https://sourceforge.net/projects/apt-checkpoint
apt-checkpoint is a utility that can take point-in-time snapshots of a Debian system. These checkpoints can then be compared to the current system (diff) and used to downgrade (rollback) to a previously working system state.