Last active
July 27, 2019 19:51
-
-
Save maddouri/051e5cfe7673fd2e9092c66d57bdbe14 to your computer and use it in GitHub Desktop.
Generating a list of manually-installed packages in Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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