Re: I just made a typo in a glob pattern for a pkg delete -g (no -a and no force) and mistakenly then selected Y, leading to partial partial system destruction before I stopped it
Date: Mon, 01 Sep 2025 02:57:35 UTC
Graham Perrin <grahamperrin_at_gmail.com> wrote on
Date: Mon, 01 Sep 2025 01:34:00 UTC :
> On 31/08/2025 20:59, Mark Millard wrote:
>
> > (The glob pattern was expected to match a lot of port-packages, more
> > than shows in a window in the context.)
> >
> > I really wish that the likes of:
> >
> > # pkg delete -r FreeBSD-ports -g . . .
> >
> > was supported …
>
>
> Is it not supported?
The not supported "it" here is: -r FreeBSD-ports
SYNOPSIS
pkg delete [-DfnqRy] [-Cgix] pkg-name ...
pkg delete [-Dnqy] -a
pkg delete [--{no-scripts,force,dry-run,quiet,recursive,yes}]
[--{case-sensitive,glob,case-insensitive,regex}] pkg-name ...
pkg delete [--{no-scripts,dry-run,quiet,yes}] --all
There is no such notation defined for "pkg delete".
(Sorry for not making it clear which part of the text
was at issue.)
In other words, the ability to directly limit the activity to a specific
repository. With that it would not matter if a pattern happens to also
match names in FreeBSD-base, for example. It is harder to generate
sufficiently unique patterns when names from all enabled repositories
have to be considered.
Also, some typos could match names from repositories that were not
intended.
> I see 'pkg-name ...' at the tail of the third of the four synopsis
> lines,
> <https://man.freebsd.org/cgi/man.cgi?query=pkg-delete&sektion=8&manpath=freebsd-ports#SYNOPSIS>.
(Yep, but that is not the part of the command text that is not
supported.)
===
Mark Millard
marklmi at yahoo.com