Skip to main content

Installing Ports

This section describes how to install and remove software using MacPorts.

Seaching MacPorts

Browse the Available Ports using you favorite browser.

Alternatively, you may query availab le ports using command lines.

To list all available ports:

$ port list

To seach ports:

$ port search portname

Installing a Port

Before installing a port, it is good practice to update the list of available packages:

$ sudo port -d selfupdate

To install a port, run the following command using the real name a port in place of "portname":

$ sudo port install portname

MacPorts will download, extract, configure and compile the resquested software. Please note that for complex packages, several depencies may be downloaded and installed. Depending on your workstation, this may take minutes to hours.

Ports are installed in /opt/local tree.

Querying installed ports

To query the names of installed ports, run the following command:

$ port list installed

Upgrading outdated Ports

To upgrade installed and outdated ports, run the following command:

$ sudo port -u upgrade outdated

Removing a Port

To remove a port, run the following command:

$ sudo port uninstall portname