Re: pkg update broke

Steve Rikli <[email protected]> Sun, 5 Jul 2026 21:22:59 -0700
Newsgroups gmane.os.freebsd.questions
Message-ID <[email protected]>
Yes, sorry -- that's my badness on the flag|command mis-ordering.

Last thought for now: afaik the pkg commands use fetch(1) to do the
download work, the fetch(1) and fetch(3) man pages mention an env var:

   SSL_NO_VERIFY_PEER

among others. Maybe try setting that and re-do your bootstrap attempt.

Wrt your system files, I dunno what would have gotten removed/corrupted
to cause this particular error. Since you have a still-working system
for reference, I'd compare things like their /var/db/pkg/ subdirs, see
if anything obvious is missing or scrambled.

If you find something obvious that can be restored from backups that's
great; otherwise I suspect you're still looking at a re-bootstrap if
we can work out how to force that.

sr.


On Mon, Jul 06, 2026 at 12:06:31AM -0400, William F. Dudley Jr. wrote:
> Steve,
> 
> The clock is correct.
> 
> pkg-static bootstrap -f
> 
> made no improvement.  pkg update still fails as before.
> 
> Interestingly, the position of the "-f" is important:
> 
> pkg-static -f bootstrap
> pkg-static: illegal option -- f
> pkg-static: Invalid argument provided
> 
> Thanks,
> Bill Dudley
> 
> On 7/6/26 12:02 AM, Steve Rikli wrote:
> > On Sun, Jul 05, 2026 at 09:37:04PM -0400, William F. Dudley Jr. wrote:
> > > I am running "FreeBSD 14.3-RELEASE-p16 amd64".
> > > 
> > > I did "freebsd-update fetch" followed by "freebsd-update install", and the
> > > power (and my UPS) failed, I think, during the "freebsd-update install"
> > > step.
> > > 
> > > Now, when I run "pkg update", I get this:
> > > 
> > > pkg: Failed to fetch
> > > https://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly/meta.conf: SSL peer
> > > certificate or SSH remote key was not OK
> > > 
> > > And identical lines for meta.txz, data.pkg, data.tzst, etc.
> > > 
> > > I have a nearly identical machine, and that machine can do pkg update
> > > successfully.
> > > 
> > > I have tried to figure out where pkg stores the SSL certificate or SSH key
> > > that it's complaining about but have been unsuccessful.  Running "man pkg",
> > > "man pkg.conf", scanning output of "pkg -vv", running "pkg -f bootstrap" all
> > > failed to help.
> > > 
> > > What is broken and how can I fix it?
> > 
> > Longshot guess: is your system clock time very far off, perhaps?
> > 
> > If you're okay with re-bootstrap, maybe try
> >     pkg-static -f bootstrap
> > 
> > ... rather than the normal 'pkg' command.
> > 
> > Cheers,
> > sr.