Apple - MacPorts Software clean-up: /opt/local/var/macports/software

Yes all the files in that folder located with in ${prefix}/var/macports/software/ can be deleted. Those are the installer packages for programs that you installed using MacPorts. MacPorts will re-download those as necessary when running the install or presumably the upgrade command too for a given program ,etc.

The descripton of the purpose of the directory ... is noted in MacPorts Guide under Binary Archives.

3.4.1. Binary Archives

Binary archives can only be used on a target system running MacPorts. Binary archives allow MacPorts utilities to begin installation after the destroot phase and install and activate a port on the target system. Binary archives are created whenever a port is installed, and can also be downloaded from a server.

...

Binary archive files are placed in ${prefix}/var/macports/software/. The archive file type is set in the macports.conf file. The default format is .tbz2; other options are: tar, tbz, tbz2, tgz, tlz, txz, xar, zip, cpgz, cpio.

Tags:

Macports