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.