Skip to content

Instantly share code, notes, and snippets.

@colwilson
Created September 4, 2016 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colwilson/ab2a87e2f2ffbb02802e5ce7e195569f to your computer and use it in GitHub Desktop.
Save colwilson/ab2a87e2f2ffbb02802e5ce7e195569f to your computer and use it in GitHub Desktop.
<code>
grep Remove /var/log/apt/history.log | tail -1 | sed -e 's|Remove: ||g' -e 's|([^)]*)||g' -e 's|:[^ ]* ||g' -e 's|,||g' > removed_packages.txt
sudo apt-get install $(cat removed_packages.txt)
<code>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment