Somewhere on the web, there was a great command line string that parsed your dpkg logs and presented a clean output to show you when you installed and removed various packages. I'm talking more than

dpkg --get-selections > installed_pkgs

rather, this command had a for loop to grab all the dpkg logs, and then used awk to find the important lines and then rewrite the output.

Anyone know a command that creates a list of installed and removed packages in Ubuntu?


Here is the script, via Linux Commando.

  • Was there an earlier version of the script that was a single command line? Given time, I can convert the pretty script to a single line, but I would prefer to reuse what I had before. – pcapademic Feb 4 '10 at 2:24
  • I didn't see one - sorry. – Iain Feb 4 '10 at 9:16

Also, if your main goal is to be able to carry this list around to multiple Ubuntu installs to get them to install the same packages, the "Synaptic" GUI tool has an "Export" feature that will actually spit out a script that you can run to install all the packages you have on the exported system. Useful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.