Created
May 22, 2017 16:44
-
-
Save kelsS/17a720e8aa807331857042cfdf49590c to your computer and use it in GitHub Desktop.
Shell script that restores most recent auto removed packages.
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
echo '#!/bin/bash' > restore.sh | |
echo sudo apt-get install `grep Remove /var/log/apt/history.log | tail -1 | sed -e 's|Remove: ||g' -e 's|([^)]*)||g' -e 's|:[^ ]* ||g' -e 's|,||g'` >> restore | |
chmod +x restore | |
./restore.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment