Created
January 24, 2021 15:38
-
-
Save jadams/5a214f8591a4742c2df97cb58d421d49 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
set -euo pipefail | |
grep $1 /var/log/apt/history.log | mawk '/Install:.*/{gsub(":amd64 [(][^)]*[)][,]?","");gsub("^Install: ","apt purge ");print}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment