[Bug 296467] pkg upgrade installs unrelated, unnecessary other packages

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 04 Jul 2026 21:47:54 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296467

--- Comment #8 from wbe@psr.com ---
(In reply to Mark Millard from comment #7)

Wow, excellent!  Thanks.  Out of all the hundreds of installed packages, only
21 were not from FreeBSD:

# pkg query %R:%n-%v | grep -v FreeBSD: | wc -l
      21

and those were all from "FreeBSD-ports:".  (I was surprised the result was >1
-- the 1 being expat-2.8.2 from this morning after changing the .conf file.)

If I understand correctly, wouldn't "pkg upgrade -rFreeBSD-ports -f", without
an explicit list, work, too?  It gets all the FreeBSD: ones, and upgrading the
FreeBSD-ports: ones should be harmless.  Since FreeBSD: isn't even defined now,
maybe I don't even need the "-rFreeBSD-ports", just another "pkg upgrade -f"?

> At that point deletion (or disabling) of the FreeBSD repository reference
> in /usr/local/etc/pkg/repos/ is appropriate.
Um, that was the change I made this morning (FreeBSD: converted to
FreeBSD-ports: with /latest).  Are you saying I need to re-add the old FreeBSD:
before doing the pkg upgrade in order to deal with orphaned files type 1?  The
"pkg upgrade expat" this morning seemed to work fine.

Re: type 1 orphaned files:
> pkg has a means of reporting these packages that have no "parent" ...
Sounds different from the pkg query %R.  Is that something I should try first? 
If so, how?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.