Reclaim was not 'safe'

Ryan Schmidt ryandesign at macports.org
Mon May 10 23:11:23 UTC 2021



On May 9, 2021, at 17:07, Gerben Wierda wrote:

> I relied on the fact that man page/help of reclaim said it would not remove active installs. So, having read that, I assumed it was unable to damage the running setup and I assumed it would only remove everything inactive, compile stuff, etc.
> 
> That was a mistake I now know. Reclaim will remove active unrequested installs. But the help/man does not say so.

I'm really sorry that it uninstalled ports that you needed; that's really not helpful.

The port-reclaim(1) manpage and `port help reclaim` say:

"port reclaim will find files that can be removed to reclaim disk space by uninstalling inactive ports on your system as well as unnecessary unrequested ports, and removing unneeded or unused installation files. The user is then provided interactive options for files to remove. No files are removed initially, until the user selects them from the provided list."

So it clearly says it will uninstall unrequested ports that are no longer needed, which users are expected to have no problem with; in fact, this functionality is one of the reasons why users are expected to want to run reclaim: to reclaim disk space for things that are no longer needed. And it says it will show you the list of everything it will uninstall before it does it. So you have an opportunity to cancel before it does that. I'm not sure how much more we can do to save the user from uninstalling things they didn't mean to uninstall. Do you have a suggestion?

Users should definitely look through the output of `port installed unrequested` and make sure that it does not contain anything you actually want. If it does, use `sudo port setrequested` to tell MacPorts which ones you actually do want, as Daniel said. Conversely, look through the output of `port installed requested` and if anything is listed that you don't actually want, use `sudo port unsetrequested` to mark it as not needed.


More information about the macports-users mailing list