Reclaim was not 'safe'

Bjarne D Mathiesen macintosh at
Mon May 10 15:43:56 UTC 2021

Daniel J. Luke wrote:
> On May 9, 2021, at 12:20 PM, Gerben Wierda via macports-users <macports-users at> wrote:
>> Anyway, the hard lesson was: reclaim is not ’safe’. I  thought, reclaim would only remove inactive installs, but it removed active ones as well.
>> It is not possible for me to retrace what went wrong exactly, sadly.
> The first thing reclaim does is this:
> --->  Checking for unnecessary unrequested ports
> Unrequested ports without requested dependents found:
> If you (like me) have an MacPorts install that pre-dates the requested flag, you'll have a bunch of ports in that list that you don't actually want uninstalled. For reclaim to work best, you need to do `port setrequested` on the ports you want to always keep - then the list of ports you see there will be stuff that got installed that you no longer need. (You can also mark things 'unrequested', see the port manpage - so you can fix things up if you mistakenly mark something requested that you don't want).
> Or, you can just hit 'n' for the first prompt.

so, doing something like this :

port -q installed \
| awk '{print $1}' \
| xargs -n1 port setrequested

before the first use of 'port reclaim' would be advisable

I (luckily) didn't get burned, but I deemed 'port reclaim' to be unsafe
in automatic update scripts. In my case eg git was set up for reclaim.

Bjarne D Mathiesen
Korsør ; Danmark ; Europa
denne besked er skrevet i et totalt M$-frit miljø
OpenCore + macOS 10.15.7 Catalina
MacPro 2010 ; 2 x 3,46 GHz 6-Core Intel Xeon ; 256 GB 1333 MHz DDR3 ECC
ATI Radeon RX 590 8 GB

More information about the macports-users mailing list