How to use “port install” without upgrading dependencies?

installation, macos, macports

Solution

Cudos, Mark!

I have looked at port options in `man port` and I have found the following surprisingly simple way:

-n       don't upgrade dependencies (affects upgrade and install) 

-b       binary-only mode (build and install from binary archives, ignore
         source, abort if no archive available)

so `port -bn install someport` can be tried as the quickest way.

Problem

As more-and-more ports depend on a great deal of other ports and those ports are frequently upgraded installation of a single port can take long hours due to unnecessary upgrades of dependencies. Can I somehow specify for macports that I do not want to upgrade my existing dependent ports when I install a new port? something like ``` sudo port install --no-deps portname # but this does not work ``` I have checked macports guide, have tried to google it up, the most similar question I have found is Debian: How to use “apt-get install” without upgrading dependencies? I have tried the option in the answer there but it does not work for macports.

Original source