Skip to content

Instantly share code, notes, and snippets.

@rof20004
Last active April 1, 2020 18:54
Show Gist options
  • Save rof20004/955517cc7821a8055c59a55eacbf0302 to your computer and use it in GitHub Desktop.
Save rof20004/955517cc7821a8055c59a55eacbf0302 to your computer and use it in GitHub Desktop.
Undo previous apt-get install
#!/bin/bash
apt purge $(grep "Install:" /var/log/apt/history.log | tail -n 1 | tr " " "\n" | grep -E ":amd64|:i386|:arm" | tr "\n" " ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment