How to remove ALL ports?

Marc André Selig mas at seligma.com
Tue Sep 26 03:11:42 PDT 2006


On 26.09.2006, at 08:56, Bengt Nilsson wrote:

> My port system seems to be genuinely corrupt on all levels.
> Is there any simple way to remove ALL ports, including port itself,  
> and do it all over?

Unless you've been manually installing things into /opt:

sudo rm -rf /opt/local


If you've got a slow connection and enough disk space, you might want  
to preserve one directory containing the original source code for  
packages that have already been downloaded:

sudo mv /opt/local/var/db/dports/distfiles /opt/distfiles
sudo rm -rf /opt/local
[... reinstall MacPorts, but don't install any packages yet ...]
sudo mv /opt/distfiles/* /opt/local/var/db/dports/distfiles/
sudo rmdir /opt/distfiles

This should not hurt even if some of those files are corrupt, since  
the freshly installed port system will check their signatures before  
using them.  It might waste some disk space, though.

Regards,
Marc




More information about the macports-users mailing list