I go to Cyber Security competitions, in which I am given an image that is tampered with, making it insecure. One of the steps of securing the image is to get rid of "bad" or "unofficial" packages.
What I want to know is how far off from a clean, fresh installation the current machine is, and look at a human-friendly list of deltas.
I want to do this by getting a list of packages that would be installed on a fresh install, and comparing it to the list of actually installed packages on the machine I am working on.
How do I get that list of fresh install packages?
I need answers for both Ubuntu server and Ubuntu desktop. (Both would be LTS versions.)