[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Uninstall (nearly) everything installed after spacific date

Joe Hart wrote:
Hash: SHA1
Bob wrote:
How can I do this, the way I'd like it to work is
cat /var/log/dpkg.log > ./list
but filtering by date so it only includes packages installed after a
certain time (grep sed?)

vi ./list
to delete lines for packages you want to keep (running kernel, less,
hddtemp, whatever...)

pass the ./list file to a command that will beautify it and output
another list of just package names that you can pass to
apt-get --purge remove

Shouldn't be too hard but my bash is rusty, so I thought I'd ask if
anyone had done this already before I crack my knuckles and get all man
bash sed grep on it?

Perhaps something list this:  (adapt it for your needs)

dpkg -l | grep beryl | gawk -F" " '{ print $2 }' > beryl.list
apt-get remove --purge $(cat beryl.list)
rm beryl.list

Thanks for that, I'll see what I can do, I found this on the web somewhere, it lists installed packages, including dependency's by the install date.
ls -l -t /var/lib/dpkg/info/*.list > ./inst.txt
so I can use that as a start point, it's probably easer to delete all references to packages installed before the cut off by hand, but I don't necessarily want the *easiest* way, or even the best way, I want the most educational and accurate way.

Reply to: