pkg update
Michael Schuster
michaelsprivate at gmail.com
Mon Jun 8 06:36:48 UTC 2020
On Mon, Jun 8, 2020, 08:25 Matthew Seaman <matthew at 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
More information about the freebsd-questions
mailing list