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

Re: Uninstall (nearly) everything installed after spacific date



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bob wrote:
> Joe Hart wrote:
>> 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 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.
>>   
> 
> Fantastic, thanks very much, you've inspired me, now I'm going to read
> the man pages and workout how those commands work, I've always found sed
> & awk a bit intimidating but they're obviously very powerful for list
> processing which I seem to do a lot, I find that starting with a working
> command or script and pulling it apart is the best way to learn.
> 
> As for why I'm doing this, well I have a PC which is ultimately
> earmarked to be a headless MythTV BackEnd but I've been using it to
> experiment with packages to figure out which ones I like for my personal
> desktop and also for a couple of old P!!!s I have as MythTV FrontEnds
> and would like to guests girlfriends and me to be able to surf the web
> and edit a document at, consequently it has lodes of stuff installed on
> it that I don't want, I was just about to reinstall Etch to clear it
> when I thought this way would be an interesting learning experience and
> a challenge for me, this list and apt.
> 
> Ultimately if it doesn't work I'm running apt-proxy on my file server so
> a reinstall doesn't take long.
> 
> Thanks for all your help I'll post my results
> 
Ah ha.  Now I understand your motivation.

I have to admit that I don't have much experience with sed, so this was
a learning exercise for me as well.  Thanks Tyler.

Reading all the manuals in the world will not help one learn as much as
practical use.

A tip for you.  Install Etch and only the base system.  Then install
only the packages you want.  You can end up with a very fast and light
system that way.  (Not implying that the default desktops are slow, but
they do IMO, contain a lot of superfluous packages)

If you want a specific list packages for a good fast KDE system, I can
help you there.

Joe

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/kLliXBCVWpc5J4RAv75AKCseqU5ZdCxxIQyhDKP3QsPV3bUIACfdq7L
63NK9khGNWJvFrBPtrM9Hy8=
=EZjB
-----END PGP SIGNATURE-----



Reply to: