Created
October 8, 2019 14:49
-
-
Save tiberiosantos/08ca0369d31e7965f3968e4766ca610a to your computer and use it in GitHub Desktop.
A script to roll back an apt upgrade
This file contains hidden or 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
# Apt upgrade roll back | |
# A release to downgrade. | |
v=testing | |
# An action to revert. | |
s=Upgrade | |
# The date the action was taken. | |
d="Start-Date: 0000-00-00 00:00:00" | |
sudo apt reinstall $(sed -n 's/([^)]*)//g;s/, //g;/'$d'/,/'$s'/ {/'$s': / {s/'$s': //;s/ /\/'$v' /gp}}' /var/log/apt/history.log) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment