Re: Unable to boot after update from within auto-admin

Jason Bacon <[email protected]> Tue, 12 May 2026 07:07:41 -0500
Newsgroups gmane.os.freebsd.questions
Message-ID <[email protected]>
On 5/12/26 06:41, Dag-Erling Smørgrav wrote:
> Jason Bacon <[email protected]> writes:
>> I coincidentally discovered a problem while working with a pkgbased
>> VM, where "pkg remove -a" removed my kernels.  This is a bug in the
>> packages, which should be marked "vital" so they cannot be removed.
> 
> That's not a bug.  If you accidentally uninstall your kernel you can
> just reinstall it.  If you accidentally uninstall pkg or your shell you
> can't do anything without rebooting from external media.
> 
> DES

Yeah, it's a bug.  The kernels should be considered vital like  other 
critical pkgbase packages, so the user cannot remove them without 
forcing the issue.  If you run "pkg remove -a" without the "y", it will 
warn you that many packages are marked "vital" and cannot be removed. 
The user is prompted to remove vital packages from the remove request 
(i.e. not remove the package). Adding "-y" answers all these prompts 
with in the affirmative, so that no vital packages are removed.  The bug 
is the fact that the kernels are not treated as "vital", while 
"FreeBSD-set-optional" is.

pkg: Cannot remove FreeBSD-nvme-tools: required by vital package 
FreeBSD-set-optional
pkg: Cannot remove FreeBSD-bsdconfig: required by vital package 
FreeBSD-set-optional
pkg: Cannot remove FreeBSD-tcpd-dev: required by vital package 
FreeBSD-set-devel
pkg: Cannot remove FreeBSD-libbegemot: required by vital package 
FreeBSD-set-optional
pkg: Cannot remove FreeBSD-libsqlite3: required by vital package 
FreeBSD-set-optional
pkg: Cannot remove FreeBSD-natd-dev: required by vital package 
FreeBSD-set-devel
pkg: Cannot remove FreeBSD-bsnmp-lib32: required by vital package 
FreeBSD-set-lib32
pkg: Cannot remove FreeBSD-bzip2-lib32: required by vital package 
FreeBSD-set-lib32
pkg: Cannot remove FreeBSD-devmatch-dev: required by vital package 
FreeBSD-set-devel
pkg: Cannot solve problem using SAT solver
cannot remove package FreeBSD-lib9p, remove it from request? [Y/n]:

-- 
Life is a game.  Play hard.  Play fair.  Have fun.