Lexi Winter <ivy_at_freebsd.org> wrote on Date: Wed, 15 Oct 2025 12:46:27 UTC :
> infoomatic wrote in <[email protected]>: > > I just want to give some feedback regarding package base. > > . . . > > 4.) I bricked the system with "pkg delete -af", as was discussed already on > > this mailing list. This should not be possible, in my opinion. > > i do not know what else you expected here. if you remove the base system, > then the system can no longer boot, because you removed it. the solution > is to not do that. > > as an aside, i am confused about the number of people who seem to run > "pkg delete -af" as a matter of course. where did you learn to do this? > is there some FreeBSD YouTuber telling people to do this? [Note: "involved", as referenced below, is intended to be tied to updating a live environment that is using the pkgbase materials in question.] This is easy to understand for a context with pkgbase not involved --and going back there was a time when it was never involved for a lot of folks. Such also applies to "pkg delete -a" and confirming the delete instead of also using -f . The -f is a secondary aspect, not primary here. So when did I use "pkg delete -a" (I did not use the -f but would review and confirm/deny)? Without pkgbase in use, it is valid to delete all port-packages (or all but pkg itself when pkg protects itself) and then start over for installing port-packages. I used to do this to clean out all port-package experiments that I'd explicitly installed (so autoremove would not delete what was explicitly installed) and then would get back to my standard set of packages with an eventual install command referencing a file listing what to install. One by one cleanup was a waste of effort/time and was potentially error prone. (This was prior to my having pkgbase in use.) "man pkg-delete" reports: -f, --force Forces packages to be removed despite leaving unresolved dependencies. In combination with the -a or --all flag, causes pkg(8) to be removed as well as all other packages. That even says that -a -f is supposed to just-work as described --and without pkgbase involved that is just port-packages that are involved. But when pkgbase is involved in the context, it fails to delete various packages (last I tested the self destruct operation). The wording is not a description of the reality for when pkgbase is involved, even if what is described would be a self-destruct operation when pkgbase is involved. Again, -a without -f has the same issue if the -a is confirmed. -f is not essential to the issue --and, in fact, I did not use -f and did review the port-package list that -a presented back before I had pkgbase involved. I could imagine that as long as pkgbase being involved leads to not working as described, that if pkgbase is involved in the context at the time, -a could be refused with a message indicating that "pkg delete -a" is not yet correctly supported when pkgbase is in use in the context. That would be better than the current behavior, no matter if -f is used with the -a or not for the delete. > . . . === Mark Millard marklmi at yahoo.com
