[Bug 296467] pkg upgrade installs unrelated, unnecessary other packages
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 04 Jul 2026 00:24:29 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296467
--- Comment #3 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to wbe from comment #2)
At least some of that status looks likely to explain some
of what is happening. You may want to make a complete read
of my notes before trying anything.
> Note: I run "pkg upgrade -f" whenever I upgrade the O/S
In your specified context, that command instead tries to update
just the repositories listed that indicate "enabled: yes". In
your notes that is:
FreeBSD-ports: {
url: "pkg+https://pkg.FreeBSD.org/${ABI}/quarterly",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
FreeBSD-ports-kmods: {
url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_quarterly_${VERSION_MINOR}",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
FreeBSD: {
url: "pkg+http://pkg.us-east.freebsd.org/${ABI}/latest",
enabled: yes,
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
mirror_type: "srv"
}
Those are all port-package repositories (kmods being special).
It excludes FreeBSD-base (which is the FreeBSD OS pkgbase
repository as you reported the content of the files).
If you were using pkg 2.7.5, if you had used:
pkg upgrade -f -rFreeBSD-base
it would have only updated the FreeBSD OS and not have
updated the port-packages. I'm unsure if you are
intending include port-packages under your "upgrade the
O/S" wording but am guessing that you did intend to
include the FreeBSD OS. My wording will try to avoid
indicating your intended target structure.
Based on use of pkg 2.6.2, you would need to use files
to specify that you want FreeBSD-base updated, or, may
be, some others not updated in the next command(s).
Having a /usr/local/etc/pkg/repos/*.conf file with
FreeBSD-base: {
enabled: yes
}
would then include FreeBSD-base by default.
Back to the port-package repositories . . .
The following 2 definitions conflict by, overall, using
both quarterly and latest in the command that you
typed:
FreeBSD-ports: {
url: "pkg+https://pkg.FreeBSD.org/${ABI}/quarterly",
. . .
FreeBSD: {
url: "pkg+http://pkg.us-east.freebsd.org/${ABI}/latest",
. . .
It looks like you will need to pkg delete the packages
that are in FreeBSD and then remove that definition before
then putting to use FreeBSD-ports (at least if you follow
modern naming conventions). I'll note that pkg delete does
not support -rFreeBSD as an option, even in 2.7.5 .
If you want FreeBSD-ports to be based on latest, then in
a /usr/local/etc/pkg/repos/*.conf file, have:
FreeBSD-ports: {
url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
}
and do so before updating the port-packages. You made
need to do an explicit pkg update to switch the context
after the adjustment.
If you want to update the FreeBSD OS separately from
the port-packages (for example), have
/usr/local/etc/pkg/repos/*.conf file(s) establish
"enabled: yes" vs. "enabled: no" for each repository
before running the command. Once you are using pkg
2.7.5 or later you can control the command from
options on the command line ( -rREPONAME option(s)
indicating which should be enabled ).
You may find it easier, or less confusing, to handle
just one repository at a time until the mess has been
taken care of. So multiple file adjustments as long as
pkg 2.6.2 is in use.
I'm not going to try to identify what port-packages
you want to have vs. not in the end.
Overall: I'm not seeing anything that would be fixed
in pkg itself or fixed in the pkgbase configuration
materials in the FreeBSD OS.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.