List User Installed Packages


I started thinking about doing a fresh linux install and was worried that I might not remember all the packages that I had manually installed. A quick search revealed a one-liner that compares the currently installed packages to the list of packages that were available initially to produce a nice list of user installed packages.

comm -23 \
  <(apt-mark showmanual | sort -u) \
  <(gzip -dc /var/log/installer/initial-status.gz | \
    sed -n 's/^Package: //p' | sort -u)