Created
December 6, 2020 11:13
-
-
Save nonohry/e46cea8e8c54371d39246a2eafa7f500 to your computer and use it in GitHub Desktop.
Remove all packages installed after a certain date/time
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
Specific date %d-%m-%d replace on here, | |
grep "2020-12-9.*.install " /var/log/dpkg.log | awk '{ print $4 }' | cut -d: -f1 | |
You get a list of packages, | |
libck-connector0 | |
libgssrpc4 | |
libkadm5clnt-mit9 | |
libkdb5-7 | |
libkadm5srv-mit9 | |
libgnutlsxx27 | |
.... | |
.... | |
Append them to the list of Apt command arguments with xargs: | |
grep "2020-12-9.*.install " /var/log/dpkg.log | awk '{ print $4 }' | cut -d: -f1 | xargs sudo apt-get --yes purge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment