pkgbase install without kernel and source packages (local directory tree with world)

From: Mark Millard <marklmi_at_yahoo.com>
Date: Fri, 23 Feb 2024 23:45:08 UTC
In order to convert a local directory tree with a world install
in it to be based on pkgbase (without the kernels or source
trees) I ended up doing a more full install then deleting with
-g 'FreeBSD-kernel-*' 'FreeBSD-src-*' :

# pkg install -rbase -g 'FreeBSD-*'

# pkg delete -g 'FreeBSD-kernel-*' 'FreeBSD-src-*'
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 8 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
FreeBSD-kernel-generic: 15.snap20240223013234
FreeBSD-kernel-generic-dbg: 15.snap20240223013234
FreeBSD-kernel-generic-mmccam: 15.snap20240223013234
FreeBSD-kernel-generic-mmccam-dbg: 15.snap20240223013234
FreeBSD-kernel-generic-nodebug: 15.snap20240223013234
FreeBSD-kernel-generic-nodebug-dbg: 15.snap20240223013234
FreeBSD-src: 15.snap20240223101451
FreeBSD-src-sys: 15.snap20240223101451

Number of packages to be removed: 8

The operation will free 2 GiB.

Proceed with deinstalling packages? [y/N]: y
. . .


pkgbase could potentially use a way to exclude a few not
wanted packages out of the around 500 packages that base
currently has (for main).

Another oddity is that, unlike install, delete does not
allow the likes of -rbase on the command line.

===
Mark Millard
marklmi at yahoo.com