Ask Different is a question and answer site for power users of Apple hardware and software. 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'm running under Snow Leopard 10.6.8 and I recently added an environment variable which it seems to be messing my bash terminal (I guess).

What I did is add the variable DYLD_LIBRARY_PATH=/Library/PostgreSQL/9.2/lib to my .bash_profile file, which looks like this:

export PATH=/Users/Carlos/pear/bin:$PATH:/Users/Carlos/android-sdks/platforms:/Users/Carlos/android-sdks/platforms-tools:/Library/PostgreSQL/9.2/bin/
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
export PATH
export DYLD_LIBRARY_PATH=/Library/PostgreSQL/9.2/lib

And then run the command:

source ~/.bash_profile

So that now I can see the variable listed along with all the environment variables when I run "set" on the terminal.

The thing is I want to remove it. I've checked several forums and to be honest none of the solutions worked for me so far.

share|improve this question
Can you not simply remove that line and run source ~/.bash_profile again? – wxs May 16 '13 at 16:22

unset it


The bash reference manual says

Once a variable is set, it may be unset only by using the unset builtin command.

share|improve this answer

Your Answer


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.