Logging software installation/removal on Debian based systems

At work we have several servers running Debian anb because we are multiple persones maintaining them we end up having software (packages) installed that no one remember the reason for. I thought I would be of great if apt/dpkg had some build-in preference you could enable so people had to ad a comment why they install the software which they are about to, and the comment would be saved along with a list of the packages installed. Perhapes if using sudo you could also log who is installing what. You cannot trust that people always will leave a name for a number of reasons. I think the two greatest reasons would be:

I have to google around some more, to see if something like this have actually been implemented.

A colleague pointed out that ‘rpm’ have the ability to roll back you system to a specific day… though havn’t tried it so sadly I don’t know how well it works. But that would be a great thing to have in ‘dpkg’ also.

Creative Commons License
Logging software installation/removal on Debian based systems by Jacob Emcken is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.