Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Aug 2025 14:56:18 +0100
From:      David Chisnall <theraven@FreeBSD.org>
To:        =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
Cc:        Tomek CEDRO <tomek@cedro.info>, Colin Percival <cperciva@freebsd.org>, vermaden <vermaden@interia.pl>, Sulev-Madis Silber <freebsd-current-freebsd-org111@ketas.si.pri.ee>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>, freebsd-stable@freebsd.org, freebsd-pkgbase@freebsd.org
Subject:   Re: PKGBASE Removes FreeBSD Base System Feature
Message-ID:  <0CC405ED-BCFC-41AD-A487-5261421BF8A6@FreeBSD.org>
In-Reply-To: <86pld62alk.fsf@ltc.des.dev>
References:  <zxdjhwcktnktdqzisgzy@qkoz> <FD0B239A-7DE4-4588-840E-C31FBBECBBEF@submonkey.net> <pecwwvnjxkiaplcpxkph@fpas> <DA41BBC2-6AD6-44FC-8C0A-213D63DBFF15@ketas.si.pri.ee> <ckjuzadqerchrokhlejz@pkwi> <ffd818ae-9922-413f-b8d8-acb7af51f865@freebsd.org> <CAFYkXjkKMpuJqZkt_x_kpFhMi2kSbJN1ydGK6y9JQeCXpX=MAQ@mail.gmail.com> <864iui3si5.fsf@ltc.des.dev> <CAFYkXjkf2NVQfv9_L=81bzK5ASxRzrfs4Jn9Jg2D0GxWUqTT2g@mail.gmail.com> <86pld62alk.fsf@ltc.des.dev>

index | next in thread | previous in thread | raw e-mail

On 8 Aug 2025, at 14:42, Dag-Erling Smørgrav <des@FreeBSD.org> wrote:
> 
> Tomek CEDRO <tomek@cedro.info> writes:
>> [...] from user perspective these changes were easy to adapt to :-)
> 
> So will this one.

Let’s remember the thing that started this entire thread: `pkg delete -af`

This is an *incredibly* stupid thing to do.  Long before pkg came along, I did the equivalent of this and managed to lock myself out of a headless box by doing this because I forgot that I was using the ports version of openssh instead of the base one.

There are lots of other ways that deleting all packages will break your system.  This is why `pkg delete` *shows you a list of packages that it will delete*, whether you specify `-a` or a single package.

If you add `-f`, you are explicitly saying ‘I know what I am doing, I don’t need to see the list of packages, I know exactly what is happening’.

To all of the people worrying about this: In the decade since pkg was introduced, how many times have you *ever* run `pkg delete -af`?  My guess, for 99% of users, the answer is zero.  It’s like running rm -rf without checking what’s in a directory first.

This entire long thread is because someone did a large destructive operation, using a tool that defaults to telling them in detail what it will do and giving them a chance to stop, and intentionally put the tool in the mode where it didn’t do that.

If that’s the most likely way of accidentally breaking a FreeBSD system, we’re in an amazing position.  I doubt it’s even in the top 100.

David




home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0CC405ED-BCFC-41AD-A487-5261421BF8A6>