> On Aug 10, 2025, at 4:47 AM, Don Lewis <truck...@freebsd.org> wrote:
>
> On 8 Aug, Jamie Landeg-Jones wrote:
>> Karl Denninger <k...@denninger.net> wrote:
>>
>>> How many of us have done an "rm -rf" in the wrong place? Uh..... same
>>> thing when you get down to it, right?
>>
>> The problem with this analogy is that "rm -rf" hasn't changed - the "-f"
>> wasn't suddenly changed from something innocuous to "force".
>>
>> Pople using "pkg delete -af" are used to using it to delete all ports.
>> I'll often do that when upgrading a server to a new major release -
>> update the base OS, with the appropriate COMPAT and compat-libs, if
>> required, then once that's working, chose a free moment to pkg-delete -af
>> all the ports, and then BATCH rebuild them from a list of previously
>> installed ports.
>>
>
> It looks like you are making extra work for youself. When you
> "pkg delete -af", you are erasing all the data about which ports you
> carefully chosen to install and whether they were manually our
> automatically installed. You need to record this info somewhere before
> you "pkg delete".
>
> If you "pkg upgrade -af" after the version upgrade, all of this info is
> preserved and selects the right ports to reinstall. You can optionally
> follow this with "pkg autoremove" to clean up unused leaf ports.
I don't think he stated that he doesn't have a list of ports/pkgs that are
wanted.
Deleting everything, and then just adding the 4 or 5 things you want (which
would end up with many more than 4-5 pkgs installed) is a pretty foolproof way
to clean up a bunch of cruft. Unless of course your base OS also goes away.