Where is the .bash_profile located? (Mac OS 10.10.5)

bashpathpythonterminal

Disclamer: I am a newbie to UNIX programming.

I downloaded Anaconda but then realized that I did not need it. I deleted and uninstalled it as fully as I could find out how. It seems that everything to do with Anaconda is gone except that the $PATH variable retains paths to folders which no longer exist.

In the terminal when I type

echo $PATH

It returns

/Users/Name/anaconda/bin://anaconda/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin

How do I remove the Anaconda path? I know that I have to change the .bash_profile, but where exactly is the file located in Mac OS?

Two additional side questions:

1) is the 'Python.framework' path part of the built in Mac python distribution, or is that related to Anaconda as well?

2) what is the /opt/X11/bin related to in the path?

Best Answer

You can edit bash profile with vi ~/.bash_profile make sure the PATH was not added in ~/.bashrc or to /etc/profile

To remove the PATH you can either remove it from the file where it was added, or simply re export the ones you need export PATH=/here/is/one:/here/is/another