Skip to content

Instantly share code, notes, and snippets.

@thomaswilley
Last active December 21, 2015 13:18
Show Gist options
  • Save thomaswilley/6311401 to your computer and use it in GitHub Desktop.
Save thomaswilley/6311401 to your computer and use it in GitHub Desktop.
remove (purge) all packages and configs installed on a given date in one line (on ubuntu/debian)
grep -w install /var/log/dpkg.log | awk '{ if ($1 == "2013-08-22") { print $4 }}' | while read -r line; do sudo apt-get -y purge $line && sudo apt-get -y autoremove; done
@thomaswilley
Copy link
Author

just replace the "2013-08-22" with the desired date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment