Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
How exactly is your port command not working? What solutions did you already find (include links, please)? –  slhck Feb 3 '13 at 15:41
    
@slhck when I type port in Terminal, it says command not found. –  Nil Feb 4 '13 at 0:37

2 Answers 2

up vote 2 down vote accepted

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

share|improve this answer
    
As 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. –  Chuim Jun 29 '13 at 15:36

There is an uninstall script on the MacPorts website. Run that. Then get the script to instal MacPorts.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.