On Aug 31, 2005, at 7:28 AM, tom sgouros wrote:
I am in the middle of upgrading from 10.2 to 10.4. My intention was to delete the whole /sw tree and start fresh, but the warnings on the fink page told me that bootstrapping didn't work with the version of XCode I
got on my install disk.  I already know of some confused dependencies
that keep update-all from working.  I wish there were a command like
'fink clear-the-decks' that erased everything except whatever fink
itself needs to run.

I have a script that can help. Put the text at the end of this message in a file, call it 'list_nonessential' and make it executable (chmod +x list_nonessential). It will list every package you have installed that's not essential, so you can just pipe that info to dpkg:

list_nonessential | sudo xargs dpkg -r

And then you'll be left with nothing but what fink really needs. Note that this can remove lots of packages, don't do it unless you're sure that's what you want!

Dave


##### list_nonessential #####
#!/usr/bin/perl
use warnings;
use strict;

use Fink::Config;
use Fink::Status;

(my $basepath = `which fink`) =~ s/bin.*//s;
Fink::Config->new_with_path("$basepath/etc/fink.conf");

my @exclude = qw(apt apt-shlibs);
my $status = new Fink::Status;
my $list = new Fink::Status->list();
for my $pkg (sort keys %$list) {
    next unless $status->query_package($pkg);
    next if exists $status->{$pkg}{essential};
    next if grep { $pkg eq $_ } @exclude;
    print "$pkg\n";
}

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to