Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jun 2020 08:36:34 +0200
From:      Michael Schuster <michaelsprivate@gmail.com>
To:        Matthew Seaman <matthew@freebsd.org>
Cc:        freeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: pkg update
Message-ID:  <CADqw_g%2BGaZfZnq-SbdJMoaP6_9-GCMQSOYCMGqHbUaS99eb%2Bcg@mail.gmail.com>
In-Reply-To: <5d3cb5f2-94d0-b16f-763c-03ff4120ed2c@FreeBSD.org>
References:  <CY4PR19MB0104E7C06DA8C433858466ABF9870@CY4PR19MB0104.namprd19.prod.outlook.com> <DB8PR06MB6442774CD0501939D4E50FB2F6870@DB8PR06MB6442.eurprd06.prod.outlook.com> <5d3cb5f2-94d0-b16f-763c-03ff4120ed2c@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 8, 2020, 08:25 Matthew Seaman <matthew@freebsd.org> wrote:

> On 06/06/2020 08:55, Manish Jain wrote:
> > This is a known problem with pkg, which sometimes happens for reasons I
> > do not know. The following steps should resolve your issue :
> >
> > rm -rf /var/cache/pkg/* /var/db/pkg/repo-*.sqlite
> > pkg bootstrap -f
> > pkg update -f
> >
>
> Doing this will really spoil your day.



This (and a whole lot of other potential issues) is a good reason to use
boot environments (which require ZFS).
I've made it a habit to always
- create and then mount a new BE
- perform all pkg operations on this mounted BE,
- temporarily active the new BE
- reboot.

In the worst case, booting the new BE will fail, but due to the temporary
activation, next boot will be with previous one, and you'll be ready for
another attempt.

Regards
Michael



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADqw_g%2BGaZfZnq-SbdJMoaP6_9-GCMQSOYCMGqHbUaS99eb%2Bcg>