How can one remove all packages installed after a certain date/time?
Specific date %yyyy-%mm-%dd
replace on here,
grep "2015-12-19.*.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 "2015-12-19.*.install " /var/log/dpkg.log | awk '{ print $4 }' | cut -d: -f1 | xargs sudo apt-get --yes purge
Incase you know the dates on which you installed these packages, the best way I've found to remove them automatically is the below command :
grep "2015-12-19.*.install " /var/log/dpkg.log | awk '{ print $4 }' | cut -d: -f1
The above will list all packages installed on the date in the command. The final command is :
grep "2015-12-19.*.install " /var/log/dpkg.log | awk '{ print $4 }' | cut -d: -f1 | sudo apt-get remove -y
Replace the date to your needs and you should be good to go !