Can I delete opt/local/bin?
Matthew Harrington
I've removed Macports because of library conflicts and use Homebrew now. And I'm having issues with Openssl and in my opt/local/bin folder, there's openssl, oldOpenssl and oldOpenssl2 which I'd like to remove, but I've read that the opt/local/bin is my macports directory. What bad things would happen if I just remove it?
2 Answers
You can just remove it.
/opt doesn't exist on a clean installation of OS X. If you want to completely uninstall MacPorts, you should anyway just have uninstalled the ports first. You can later install most applications again, through Homebrew, which also has OpenSSL.
To remove all currently installed ports – which you probably can't do because you already uninstalled MacPorts:
sudo port -fp uninstall --follow-dependents installedThis would also remove the binaries in /opt/local/bin. The rest is cleanup of additional directories, including /opt/local, which is just the MacPorts prefix. It's unlikely anything else would write files there.
This is all explained in the official uninstall instructions as well. Full removal includes removing some other directories as well, like:
/Applications/DarwinPorts
/Applications/MacPorts
/Library/LaunchDaemons/org.macports.*
/Library/Receipts/DarwinPorts*.pkg
/Library/Receipts/MacPorts*.pkg
/Library/StartupItems/DarwinPortsStartup
/Library/Tcl/darwinports1.0
/Library/Tcl/macports1.0
~/.macports /opt is optional, there are no system components at all.... OpenSSL is included in base system, so you need to install system headers Aka SDK in addition to Xcode to succeed in compiling. Another choice if you really want to compile a lot of GNU world you can use Fink.