Uninstall MacPorts without Port command working on Mac OS X 10.8.2
Found the solution myself. In order to get the port
command to work, you must include it in your PATH variable or else the Terminal won't understand the command.
Open Terminal then type this
open -e .bash_profile
then TextEdit will be opened with the .bash_profile loaded.
Add this code into the next line
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
Save your changes then type
port
in Terminal to see if it is working.
Once you get the port
command working then just follow the uninstall guide.
Source: MacPorts Guide
Related videos on Youtube
Nil
Updated on September 18, 2022Comments
-
Nil over 1 year
According to MacPorts' wiki/guide you need to have a working Port command but in my case the Port command isn't working.
How do I uninstall MacPorts?
I have tried Googling the solution but what I found is that someone said on some random discussion board that just skip Port command part and directly move onto the next one but some files will remain.
I have seen a lot of 'solutions' online but most of them ending with the user reinstalling MacPorts due to corrupted/failed installation. This isn't what I am looking for.
I don't want some files to remain, I want to clean it completely as I am not planning to reinstall MacPorts any time soon.
*By the way, I have HomeBrew installed, I hope the solution that you guys offers won't tamper with my HomeBrew installation.
Thanks.
-
slhck over 11 yearsHow exactly is your
port
command not working? What solutions did you already find (include links, please)? -
Nil over 11 years@slhck when I type
port
in Terminal, it says command not found.
-
-
Lorenzo almost 11 yearsAs you'll be removing MacPorts anyway, I'd suggest that instead of adding that line to your bash profile, just type it in the terminal window before running the uninstall procedure. It will add
port
to the path for the duration of that terminal session.