Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to install PhoneGap on my osx and accidentally set a bunch of PATH variables wrong, so now it looks like this:


...when the correct ones are the two last paths. How can i can delete those wrong ones?

I followed phonegap's instructions to set it up, ie.

touch ~/.bash_profile; open ~/.bash_profile and

export PATH=${PATH}:/Development/android-sdk-macosx/platform-tools:/Development/android-sdk-macosx/tools and

source ~/.bash_profile

to insert those variables... and I think those are causing the problems I'm facing when setting up new projects.

share|improve this question
up vote 1 down vote accepted

The $PATH should be reset every time you start a BASH session. Unless you have also changed something in your ~/bashrc. What happens if you open a new terminal?

Anyway, the easiest fix would be to run this command from your terminal:

 export PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin:/Users/dd/Dev/adt-bundle-mac-x86_64/sdk/platform-tools:/Users/dd/Dev/adt-bundle-mac-x86_64/sdk/tools

Make this permanent by changing whatever you have in ~/.bash_profile to :

export PATH=${PATH}:/Users/dd/Dev/adt-bundle-mac-x86_64/sdk/platform-tools:/Users/dd/Dev/adt-bundle-mac-x86_64/sdk/tools
share|improve this answer
the thing is if I open up that .bash_profile again with that same command (touch) it only has the last inserted export blah blah thing there. – micadelli Feb 10 '13 at 21:35
@micadelli touch does not open the file, it just (in this case) creates it if it is not there. That last blah blah is all you need. As long as that is what you have in bash_profile, next time you log in it will be fine. You can check simply by opening a new terminal. All this would be much clearer if you could post your ~/.bash_profile and ~/.bashrc files. – terdon Feb 10 '13 at 21:37
inserting that first one into terminal did the trick! thank you. Now it's clean and just as it should be – micadelli Feb 10 '13 at 21:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .