From owner-freebsd-questions@FreeBSD.ORG Thu Oct 11 21:13:27 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 31C1716A480 for ; Thu, 11 Oct 2007 21:13:27 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id 49B4E13C46E for ; Thu, 11 Oct 2007 21:13:24 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-31-60.bredband.comhem.se ([83.253.31.60]:62988 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1Ig5LN-0006rY-8L for freebsd-questions@freebsd.org; Thu, 11 Oct 2007 23:13:21 +0200 Received: (qmail 65720 invoked from network); 11 Oct 2007 23:13:17 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 11 Oct 2007 23:13:17 +0200 Received: (qmail 24691 invoked by uid 1001); 11 Oct 2007 23:13:17 +0200 Date: Thu, 11 Oct 2007 23:13:17 +0200 From: Erik Trulsson To: James Message-ID: <20071011211317.GA24658@owl.midgard.homeip.net> Mail-Followup-To: James , Kevin Kinsey , freebsd-questions References: <1192134379.33933.9.camel@secretariat.lanl.gov> <470E8D3A.8010508@daleco.biz> <1192136857.33933.18.camel@secretariat.lanl.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1192136857.33933.18.camel@secretariat.lanl.gov> User-Agent: Mutt/1.5.16 (2007-06-09) X-Originating-IP: 83.253.31.60 X-Scan-Result: No virus found in message 1Ig5LN-0006rY-8L. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1Ig5LN-0006rY-8L cc7e471b7d5f7cade1e14f4056f3bb5b Cc: freebsd-questions Subject: Re: I performed an rm -r on /var/lib/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: Thu, 11 Oct 2007 21:13:27 -0000 On Thu, Oct 11, 2007 at 03:07:37PM -0600, James wrote: > On Thu, 2007-10-11 at 15:53 -0500, Kevin Kinsey wrote: > > > James wrote: > > > Call it a moment of sheer stupidity, call it a misremembering, call it > > > whatever you want (and I imagine I'll hear a few different ones), but I > > > just did an rm -r /var/lib/pkg. > > > > > > Before I type anything to damage things further, does anyone have any > > > suggestions as to how to recover from this? I have other FreeBSD boxes > > > available to me, none with the same pkg list, though. I'll be reading > > > man pkgdb in the meantime.. > > > > > > I'm guessing you might be Real Tired(tm). Do you mean > > /var/db/pkg? > > > > $ ll /var/lib/pkg > > ls: /var/lib/pkg: No such file or directory > > > > Kevin Kinsey > > > > Yes, you're right. On all counts, I'm afraid. > > But, yes, ultimately. And the more I'm reading man pages, the more I'm > thinking that the only solution here will be to reinstall everything. I > was wondering if portmaster or something similar might be able to solve > this, but it looks like /var/db/pkg is what *everything* refers to. Yes, /var/db/pkg/ is where all the information about installed ports/packages is stored. To recreate that information you will have to reinstall everything. > > I'm feeling like the least competent user in the world right now. Though > it *does* teach me a valuable lesson about backing up. Backups are good, yes. Regular, up-to-date, backups are even better. -- Erik Trulsson ertr1013@student.uu.se