Re: Uninstall (nearly) everything installed after spacific date
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tyler Smith wrote:
> On 2007-03-18, Joe Hart <j.hart@orange.nl> wrote:
>> ls -lt /var/lib/dpkg/info/*.list | awk -F"/" '{print $6}' | awk -F"."
>> '{print $1}' > list.txt
>>
>> will give you a list of packages in cronological order. That you can
>> then edit and feed to apt-get. Like I said, I don't know why you want
>> to do it, but I found it fun creating that line.
>>
>> I'm getting better with awk. :)
>>
>> That command should be all one line. I can't quite figure out how to
>> get it to pull only after a certain date. It does them all.
>>
>
> I'm just getting started with awk, but this seems to work:
>
> ls -lt /var/lib/dpkg/info/*.list | sed 's/.*\(200[0-9]\)/\1/g' |
> awk '$0 > "2007-03-01"' | awk -F"/" '{print $6}' |
> awk -F"." '{print $1}' > list.txt
>
> This produces a list of packages altered after 2007-03-01. You can
> change that date around, or extend it to select a particular hour or
> minute on that day to use as the cut-off.
>
> Note that I have no idea what you're doing, or how dpkg works, I just
> wanted to see if I could figure out a solution to the immediate
> problem with sed and awk!
>
Now that's what I call a command! Good job Tyler. I hope Bob likes it.
- --
Registerd Linux user #443289 at http://counter.li.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF/VPwiXBCVWpc5J4RAuh8AJsEvyu4yTotd1F9JpM7sTcnTftHvQCcC81y
RRPQ/utPT3XSBgTFKgMZtfU=
=p+Xy
-----END PGP SIGNATURE-----
Reply to: