From owner-freebsd-ports@FreeBSD.ORG Tue Oct 2 11:13:10 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F502106564A for ; Tue, 2 Oct 2012 11:13:10 +0000 (UTC) (envelope-from matthew@freebsd.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 0100F8FC12 for ; Tue, 2 Oct 2012 11:13:09 +0000 (UTC) Received: from rufus.webfusion.com (mail.heartinternet.co.uk [79.170.40.31]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q92BD535024528 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Tue, 2 Oct 2012 12:13:06 +0100 (BST) (envelope-from matthew@freebsd.org) X-DKIM: OpenDKIM Filter v2.5.2 smtp.infracaninophile.co.uk q92BD535024528 Authentication-Results: smtp.infracaninophile.co.uk/q92BD535024528; dkim=none (no signature); dkim-adsp=none X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host mail.heartinternet.co.uk [79.170.40.31] claimed to be rufus.webfusion.com Message-ID: <506ACC41.5000100@freebsd.org> Date: Tue, 02 Oct 2012 12:13:05 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: <201210020808.q9288Y2J023975@mech-cluster241.men.bris.ac.uk> <506AB4C8.6020208@freebsd.org> <20121002103310.GA3931@kontrol.kode5.net> In-Reply-To: <20121002103310.GA3931@kontrol.kode5.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.6 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Subject: Re: removing non-existent ports from /var/db/pkg ? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 11:13:10 -0000 On 02/10/2012 11:33, Jamie Paul Griffin wrote: > Hi Matthew and Anton, so in the meantime what is the best way to > clear this old stuff out? I do like to clear out code and files that > are redundant, where possible. What would you suggest? At the moment, the only way to clear up is to manually remove the outdated subdirectories from /var/db/ports. You can work out what is out of date by comparing the list of sub-dirs to the list of installed ports obtained by pkg info -aq Should only take a few minutes to write a small script to do that. Be careful not to trash local.sqlite, repo.sqlite or auditfile -- in fact, anything in /var/db/pkg which is not a directory should be preserved. Note: even if you do delete subdirs that are actually still in use, this shouldn't be a huge disaster. The only data still in those directories will be portmaster's cache of distfile info (which it can cope without: it uses it to efficiently identify old distfiles that can themselves be tidied up) and flag files like +IGNOREME which you will want to regenerate before you next do a ports update. Cheers, Matthew