Ubuntu – How to list all packaged installed by me

aptpackage-management

I am trying to clean my installation up a bit, so I decided to clean up my packages a bit. However, I'm having trouble with that: My wish is to make apt-get list all packages installed by me. If I list every package, I also see the dependencies of my packages although I am not interested in those. For example, I want to see that I installed lightyears but I do not want to see the packages installed alongside, like python-numpy or python-pygame. Is there a way to do this?

Best Answer

It's a quick hack, but this gets me very close:

manifest='http://releases.ubuntu.com/raring/ubuntu-13.04-beta2-desktop-amd64.manifest'

comm -2 -3 \
  <(apt-mark showmanual | sort) \
  <(curl --silent "$manifest" | grep --perl-regexp --only-matching '^[\w-.+]+' | sort)

You'll have to look up the package manifest for your version of Ubuntu from the releases server.

This method still returns a few packages that were selected via the Language Support installation prompt and the install third-party software checkbox, but depending on your needs it might be good enough.

Related Question