Is It Safe To Use reclaim?

Clemens Lang cal at macports.org
Sun May 3 12:33:18 UTC 2020


Hi Michael,

On Sun, May 03, 2020 at 09:18:46AM +0700, Michael Newman via macports-users wrote:
> Late last year I ran reclaim for the first time. It was somewhat of a
> disaster because it removed ports that I actually wanted and I ended
> up having to completely reinstall MacPorts.
> 
> Since then I have been afraid to use it again.

As far as I know there is a confirmation before reclaim uninstalls
anything if stdout is connected to a terminal (but then again I'm
usually running macports master, so that may not have made it into a
release, others might want to chime in to confirm what I said).


> As far as I can tell there is no way for me to be sure that ports that
> I have actually requested have been so flagged:
> 
> MrMuscle:~ mnewman$ port installed | grep lynx
>   lynx @2.8.9rel.1_1+ssl (active)
> MrMuscle:~ mnewman$ port installed requested | grep lynx
> MrMuscle:~ mnewman$ 
> 
> I know that I can use setrequested to flag a port, but how can I know
> on which ports I need to do that?

Doesn't this output do exactly what you need? It tell you that lynx is
not selected on your system. Btw, instead of having macports print the
entire list and then grep through it, you can have macports do the
filtering:

  $> port installed lynx and requested


> The only way I can think of is to manually go through the list of
> installed ports, try to recognize the ones I've requested, check to
> see if they are so flagged and, if not, manually flag them.
> 
> Is there an easier way?

You can start with the output of 'port installed leaves', which is what
reclaim will use as a basis for uninstallation. If there's anything in
there you want, mark it as requested. 'port installed rleaves' does the
same thing, but recursively.


Additionally, if you want more interactive control over what gets
uninstalled, install the 'port_cutleaves' port and run 'sudo
port_cutleaves'. It will interactively ask you before uninstalling each
leaf.

HTH,
-- 
Clemens


More information about the macports-users mailing list