Mac OSX MacPorts command line

November 14, 2009 § Leave a comment

Default MacPorts location is /opt/local/

Display all installed ports
port installed

Display all contents on specific installed port
port contents <package>

Runs a selfupdate operation to update the ports tree and MacPorts base with the latest release.
sudo port selfupdate

Display outdated installed ports against the MacPorts repository to see if updated Portfiles have been released since your ports were installed.
port outdated

Upgrades installed ports and their dependencies
sudo port upgrade <package>

Upgrade all outdated ports
sudo port upgrade outdated

Uninstall ports
port uninstall <package>

Uninstall ports with dependency of another port. To override this behavior, use the -f (force) switch
port -f uninstall <package>

Deletes all intermediate files that MacPorts creates while building a port. A port clean is also often necessary to remove corrupted tarballs after a failed fetch phase.
port clean -all <package>

Shows you the dependencies of a port; dependencies are explicitly declared in Portfiles
Port deps <package>

To uninstall MacPorts from the default location /opt/local/. Be sure you check your path before deleting or uninstalling MacPorts
sudo rm -rf \


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading Mac OSX MacPorts command line at Web Builders.


%d bloggers like this: