I thought pkg(8) wasn't supposed to upgrade packages that aren't installed. Is there a way to prevent this?
On FreeBSD 14.3-STABLE:
The man page says:
On FreeBSD 14.3-STABLE:
# pkg info | grep apache
# pkg upgrade -n apache24
Code:
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 11 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
apache24: 2.4.64 [FreeBSD]
apr: 1.7.5.1.6.3_4 [FreeBSD]
brotli: 1.1.0,1 [FreeBSD]
curl: 8.14.1 [FreeBSD]
expat: 2.7.1 [FreeBSD]
gdbm: 1.25 [FreeBSD]
jansson: 2.14.1 [FreeBSD]
libnghttp2: 1.66.0 [FreeBSD]
libpsl: 0.21.5_2 [FreeBSD]
libssh2: 1.11.1,3 [FreeBSD]
pcre2: 10.45_1 [FreeBSD]
Number of packages to be installed: 11
The process will require 46 MiB more space.
10 MiB to be downloaded.
The man page says:
which I suppose excuses all but the first one. Regarding apache24 itself, the man page says:pkg upgrade will not install new packages, except as required to fulfil dependencies of the packages listed on the command line.
but doesn't specifically define any behavior when the caller ensures that NO installed candidates match the request.A caller should ensure that patterns specified as arguments have installed candidates for matching.