title: "Unsource" a .bash_profile or .bashrc script
body: <p>I had a function in my ~/.bash_profile file, like so:</p>
  
  <pre><code>function foo {
    echo "foo"
  }
  </code></pre>
  
  <p>after sourcing the .bash_profile file, </p>
  
  <pre><code>source ~/.bash_profile
  </code></pre>
  
  <p>I can run foo at the command line:</p>
  
  <pre><code>$ foo
  </code></pre>
  
  <p>say I want to change the name of foo to bar</p>
  
  <pre><code>function bar {
    echo "foo"
  }
  </code></pre>
  
  <p>and I re-source the .bash_profile file</p>
  
  <pre><code>source ~/.bash_profile
  </code></pre>
  
  <p>It appears that both <code>foo</code> and <code>bar</code> are available at the command line. Why is that? and how can I clear the old .bash_profile code out of memory or wherever it's being stored?</p>