Date: Thu, 11 Oct 2007 15:29:05 -0600 From: James <jamesh@lanl.gov> To: Erik Trulsson <ertr1013@student.uu.se> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: I performed an rm -r on /var/lib/pkg Message-ID: <1192138145.33933.21.camel@secretariat.lanl.gov> In-Reply-To: <20071011211317.GA24658@owl.midgard.homeip.net> References: <1192134379.33933.9.camel@secretariat.lanl.gov> <470E8D3A.8010508@daleco.biz> <1192136857.33933.18.camel@secretariat.lanl.gov> <20071011211317.GA24658@owl.midgard.homeip.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2007-10-11 at 23:13 +0200, Erik Trulsson wrote: > 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. > > > Alas, though, regular, up-to-date backups ain't happened here. What has happened, though, is I've never ran rm in /usr/ports/distfiles. I'm going to think for a little bit about a script that can move through /usr/ports/distfiles and reinstall everything that exists there.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1192138145.33933.21.camel>