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.

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

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

...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

1 Answer 1

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

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.