MacPorts

Reference for working with MacPorts.

MacPorts help

Manual for ports

man port

Location of installed ports

/opt

Update MacPorts

Upgrade mac ports and the port list

sudo port selfupdate

Search for ports and display port info

List all available ports

port list

Search for a port name

port search <name>

Show information about a particular port

Show the variants (additional components) that can be installed with a port

Install / uninstall ports

Install an item (use +<variant> or -<default> to add or remove additional components)

Remove an installed item (will fail if item has dependants, override with -f flag)

Remove all inactive ports

Upgrade installed ports

Show a list of outdated items, their installed version and the available MacPorts version

Update the old items and remove the old version

Update the old items (keeping the original version and deactivating it)

Upgrade an installed item (add -n to not update dependencies, -u to remove old version)

Show installed port information

Show all installed items, their versions and activation status

Show details about an installed item

Show active installed ports

Show inactive installed ports

Show items that depend on the named item (eg. port dependents curl):

Show dependencies the item has

Show the files that were installed by a port install

Clean up MacPorts

Clean up all files (work, dist, archive) for all ports

Clean up selected file types (work, dist, archive) for specified port

Last updated