Forcing a recompilation of an installed port without uninstalling

Lawrence Velázquez larryv at
Tue Jan 20 11:22:23 PST 2015

On Jan 20, 2015, at 7:08 AM, René J.V. Bertin <rjvbertin at> wrote:

> Does `upgrade` work like `install` would if you have just done a manual destroot?

`port destroot` does not actually install anything, so no. And `port upgrade` preserves the variant selection of the currently-installed port, while the other subcommands do not.

>> Single-dash single-letter flags like "-f" are "global" and have no effect unless placed after the word "port" and before the command verb (e.g. "sudo port -f uninstall"). Double-dash multiple-letter flags like "--force" are specific to the command verb in question, so they must be placed after the command verb and before any subsequent arguments (e.g. "sudo port -n upgrade --force").
> That's not exact in my experience. It happens often enough that `port install` runs into stray files under ${prefix} (left there because of me, not MacPorts). Adding -f *after* the install verb has always worked for me in those cases.

If that's the case, it's a bug in port(1)'s option-parsing, and you should not rely on it.


More information about the macports-dev mailing list