From owner-freebsd-questions@FreeBSD.ORG Tue Aug 4 22:37:48 2009 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36DFA1065676 for ; Tue, 4 Aug 2009 22:37:48 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ew0-f206.google.com (mail-ew0-f206.google.com [209.85.219.206]) by mx1.freebsd.org (Postfix) with ESMTP id C1F5D8FC08 for ; Tue, 4 Aug 2009 22:37:47 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: by ewy2 with SMTP id 2so4055416ewy.43 for ; Tue, 04 Aug 2009 15:37:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=tbbPMXvhkaAz1YtzsyM9NuCz35xanlZeGnbimaJ33XE=; b=pt68LJu6oD5+ybMhAmWhd/Ds23IXUWVa1OZC1YbY7LZG9Ns6YCFpjQ+GY+y2tfstUh u4ce1wVuUiXqhKf3TlByp/7tHjfw+QT+PnQHfZ1uHaz2qqzoK9WuhWvnIZzmaxqhGaiz U3FoxPLP1MNENRKhkQ0BOeCkS7hLIOPsRfbgk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=fqWfHzaNVpnWlHYD2BgDpqL7+5LXZwaf8vP36BmTu7TKY0pdkyNrf0xdbGeQR1Llzw 5fjY36iY+YCAN+tLMxBHVko+rtgLm6LFfWPD7Dh5KbiPzxpSBShbJ+AWuX2d75VWMctJ olJhxnoTDtVl16HdoMJjEmgYaeNVIYZ/VQraY= MIME-Version: 1.0 Received: by 10.216.21.205 with SMTP id r55mr1579541wer.175.1249425466574; Tue, 04 Aug 2009 15:37:46 -0700 (PDT) Date: Tue, 4 Aug 2009 22:37:46 +0000 Message-ID: From: "b. f." To: freebsd-questions@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: not dead [yet]. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2009 22:37:48 -0000 Roland Smith wrote: >What you can do is make a list of all installed ports with ports-mgmt/portmaster: > portmaster -L >ports.list > >Looking through this list, you'll see four categories; >- Root ports (No dependencies, not depended on) >- Trunk ports (No dependencies, are depended on) >- Branch ports (Have dependencies, are depended on) >- Leaf ports (Have dependencies, not depended on) > >Basically, you can delete any of the leaf and root ports, because >they're not depended on. E.g. if you have the following in your list as >a leaf port: > ===>>> qemu-0.10.6 >you can execute 'pkg_delete -d qemu-0.10.6' as root, and it is gone. If you're only interested in deletion, "-l" should be preferred to "-L". And portmaster with these flags does not always account for build dependencies. so with this method you may occasionally remove a port that is only used to build other ports, but is not a runtime dependency of any other port. Also, occasionally a port Makefile doesn't properly account for some dependencies, and removing them will break the port. So there may be some breakages that you'll have to fix, but this shouldn't happen often. When removing ports, I sometimes use pkg_deinstall -vR, sometimes also with -i. because it can clean out the now-unneeded dependencies of the port I'm removing, which speeds up this process. Provided your pkgdb and portsdb are up-to-date, it's a little better than portmaster -s, which relies on +REQUIRED_BY to detect stale dependencies, and may occasionally fail. b.