Skip to content

Instantly share code, notes, and snippets.

@meyt
Last active July 24, 2019 06:28
Show Gist options
  • Save meyt/5a1ded736b847dce9c17b471691e3a30 to your computer and use it in GitHub Desktop.
Save meyt/5a1ded736b847dce9c17b471691e3a30 to your computer and use it in GitHub Desktop.
Resotre latest purged APT packages
#!/bin/bash
# from: https://serverfault.com/a/646116
sudo apt-get install `grep Purge /var/log/apt/history.log | tail -1 | sed -e 's|Purge: ||g' -e 's|([^)]*)||g' -e 's|:[^ ]* ||g' -e 's|,||g'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment