title: Updating bash environment variables using source
body: <p>On <code>OS X Mountain Lion</code> The <code>source</code> command only seems to update my path when I have <em>added</em> something to it in .bashrc or .bash_profile. If I <em>delete</em> a path from either of these files, then use <code>source</code> to update, the deleted path remains. An example...</p>
  
  <p>Adding to my <code>PATH</code> in <code>.bash_profile</code></p>
  
  <p>In <code>terminal</code></p>
  
  <pre><code>&gt; echo $PATH
  &gt; "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin"
  </code></pre>
  
  <p>Add to path in <code>.bash_profile</code></p>
  
  <pre><code>export PATH=$PATH:~/Desktop
  </code></pre>
  
  <p>Back in <code>terminal</code></p>
  
  <pre><code>&gt; source .bash_profile
  &gt; echo $PATH
  &gt; "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/myname/Desktop"
  </code></pre>
  
  <p>So, all that went as expected; my <code>Desktop</code> has been added to my <code>PATH</code>. Now after I delete the previously added path from <code>.bash_profile</code>, leaving this file empty</p>
  
  <pre><code>&gt; source .bash_profile
  &gt; echo $PATH
  &gt; "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/myname/Desktop"
  </code></pre>
  
  <p>As you can see the 'deleted' path <code>'/Users/myname/Desktop'</code> remains. Am I misunderstanding what
  <code>source</code> does? I thought It was equivalent to opening a new terminal window (which does return
  the result I was expecting - i.e. no Desktop path)</p>