From owner-freebsd-questions@FreeBSD.ORG Tue Sep 18 15:50:05 2007 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 6334A16A478 for ; Tue, 18 Sep 2007 15:50:05 +0000 (UTC) (envelope-from mlt01+OO=6a28a6b4@mlists.homeunix.com) Received: from turtle-out.mxes.net (turtle-out.mxes.net [216.86.168.191]) by mx1.freebsd.org (Postfix) with ESMTP id 403F113C45E for ; Tue, 18 Sep 2007 15:50:05 +0000 (UTC) (envelope-from mlt01+OO=6a28a6b4@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by turtle-in.mxes.net (Postfix) with ESMTP id 308181055F for ; Tue, 18 Sep 2007 11:22:24 -0400 (EDT) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id DF229519DA for ; Tue, 18 Sep 2007 11:22:17 -0400 (EDT) Date: Tue, 18 Sep 2007 16:22:14 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20070918162214.43a1988f@gumby.homeunix.com.> In-Reply-To: <20070918124601.GA52705@amilo.cenkes.org> References: <8980.80.80.2.75.1190116887.squirrel@webmail1.one.com> <20070918124601.GA52705@amilo.cenkes.org> X-Mailer: Claws Mail 3.0.0 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: Deleted /var/db/pkg 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, 18 Sep 2007 15:50:05 -0000 On Tue, 18 Sep 2007 16:46:03 +0400 Andrew Pantyukhin wrote: > On Tue, Sep 18, 2007 at 02:01:27PM +0200, > nikolaj.thygesen@diamondbox.dk wrote: > > Hi list, > > > > Suppose you deleted /var/db/pkg by accident :( What would you > > do to get it back?? > > I'd go one of these ways: > - rm -rf /usr/local ... > - rebuild all the packages I need in a chroot, then pkg_add them > Or do both, so you can build at your convenience, and have a full set of packages ready when you delete /usr/local/. I think in the long-term removing /usr/local may be the easiest thing to do - it's a lot easier to know what you need than what you had. And it gets rid of any stray files from miss-matched packing-lists.