On the 9th of November I tried installing the last stable release of BasKet Note Pads which apparently is not supported off the bat because it needs to be ported to QT4 and KDE 4, whatever that means. The program has been ported but it is, as of 2010, in beta phase meaning it is basically buggy and lacks the functionality that I need.

As such, I tried installing BasKet v1.x which needed QT3 and a bunch of other things I don't know much about. I tried installing them and ended up filling 20% of my 15 GB hard drive. Of course, I never got BasKet to work but the packages I installed are still there and now I need to effectively uninstall everything I installed that day.

Is there a command to uninstall all packages installed on a certain date (in my case, the 9th of November) ?

share|improve this question
    
yes but couldn't you further grep the log file for if date after and pipe that output to the remove command? THanks – Jeff Morgan Dec 19 '15 at 8:19

Specific date %d-%m-%d 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
....
....

all packages move into single line with seprated by space and execute,

sudo apt-get purge libck-connector0 libgssrpc4 libkadm5clnt-mit9 libkdb5-7 libkadm5srv-mit9 libgnutlsxx27 .... 
share|improve this answer

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 !

share|improve this answer
    
Your command outputs the packages as in the answer below. You might want to pipe the output of cut to tr '\n' ' ' and then to apt. +1 Anyway :) – egy Feb 26 '17 at 19:32

You can see what packages you've installed in chronological order by doing:

grep install /var/log/dpkg.log

(the last entries will be the most recent)

On the left, you can find the installation date and time.

Pick what you wish to uninstall and do

sudo apt-get remove package-name

Also, as you have a small hard disk, I would recommend removing from your disk the Deb packages used for the installation of the programs:

sudo apt-get clean

This will remove the deb files from /var/cache/apt/archives/

share|improve this answer
    
Thanks for the answer but there are hundreds of entries. Surely I'm not expected to uninstall every entry manually... – user1841330 Nov 12 '14 at 10:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.