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.


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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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