Skip to content

Instantly share code, notes, and snippets.

@maddouri
Last active July 27, 2019 19:51
Show Gist options
  • Save maddouri/051e5cfe7673fd2e9092c66d57bdbe14 to your computer and use it in GitHub Desktop.
Save maddouri/051e5cfe7673fd2e9092c66d57bdbe14 to your computer and use it in GitHub Desktop.
Generating a list of manually-installed packages in Ubuntu
#!/usr/bin/env bash
set -eux
# From
# * Generating list of manually installed packages and querying individual packages
# * https://askubuntu.com/a/492343/543097
# Tested on Ubuntu 18.04
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment