Generating a record of the full(-ish) package management state
- by intuited
I'm about to make some system changes and I'd like to have a record of my current happy system state. Is there a convenient way to create a record of this? I'd like to keep track of info like
currently installed packages and their versions
which packages are pinned at what version
which source (as in /etc/apt/sources.list) they were installed from
whether they were installed directly or automatically installed as a dependency of a different package
"unknown unknowns": ie stuff that I don't know that I should be keeping track of but which may be important when trying to figure out why something doesn't work
In short, I'd like to keep as much of the aptitude database as possible. What's the best way to do this? It would be nice if the resulting records were easily readable, though this is not really essential. It would be extra nice if it were readily versionable through an SCM tool like git.
There is a superuser question that partially answers this, but it only provides the list of currently installed packages.