On 8 Aug 2025, at 14:42, Dag-Erling Smørgrav <[email protected]> wrote:
> 
> Tomek CEDRO <[email protected]> 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



Reply via email to