title: Safest method to clean up my .bash_profile on MacOS?
body: <p>I'm new to the Mac environment and installed the Anaconda GUI by accident. I wished to remove it completely and install Miniconda instead. I think I was successful, except the only remnant I can find of Anaconda is in my <code>.bash_profile</code>. It looks something like:</p>
  <pre><code># &gt;&gt;&gt; conda initialize &gt;&gt;&gt;
  # !! Contents within this block are managed by 'conda init' !!
  __conda_setup=&quot;$('/Users/connor/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2&gt; /dev/null)&quot;
  if [ $? -eq 0 ]; then
      eval &quot;$__conda_setup&quot;
  else
      if [ -f &quot;/Users/connor/opt/anaconda3/etc/profile.d/conda.sh&quot; ]; then
          . &quot;/Users/connor/opt/anaconda3/etc/profile.d/conda.sh&quot;
      else
          export PATH=&quot;/Users/connor/opt/anaconda3/bin:$PATH&quot;
      fi
  fi
  unset __conda_setup
  # &lt;&lt;&lt; conda initialize &lt;&lt;&lt;
  </code></pre>
  <p>Is <code>.bash_profile</code> something included with my system by default? How should I revert all of the changes Anaconda made to my file or would I be safe to just delete it entirely?</p>
  <p>Note: I do not have Miniconda installed yet and am waiting to completely remove all traces of Anaconda first.</p>
  <p><strong>Edit:</strong>
  Additionally, I have found more artifacts in <code>.xonshrc</code> and <code>.zshrc</code>. They show, respectively:</p>
  <pre><code># &gt;&gt;&gt; conda initialize &gt;&gt;&gt;
  # !! Contents within this block are managed by 'conda init' !!
  import sys as _sys
  from types import ModuleType as _ModuleType
  _mod = _ModuleType(&quot;xontrib.conda&quot;,
                     &quot;Autogenerated from $(/Users/connor/opt/anaconda3/bin/conda shell.xonsh hook)&quot;)
  __xonsh__.execer.exec($(&quot;/Users/connor/opt/anaconda3/bin/conda&quot; &quot;shell.xonsh&quot; &quot;hook&quot;),
                        glbs=_mod.__dict__,
                        filename=&quot;$(/Users/connor/opt/anaconda3/bin/conda shell.xonsh hook)&quot;)
  _sys.modules[&quot;xontrib.conda&quot;] = _mod
  del _sys, _mod, _ModuleType
  # &lt;&lt;&lt; conda initialize &lt;&lt;&lt;
  </code></pre>
  <p>and</p>
  <pre><code># &gt;&gt;&gt; conda initialize &gt;&gt;&gt;
  # !! Contents within this block are managed by 'conda init' !!
  __conda_setup=&quot;$('/Users/connor/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2&gt; /dev/null)&quot;
  if [ $? -eq 0 ]; then
      eval &quot;$__conda_setup&quot;
  else
      if [ -f &quot;/Users/connor/opt/anaconda3/etc/profile.d/conda.sh&quot; ]; then
          . &quot;/Users/connor/opt/anaconda3/etc/profile.d/conda.sh&quot;
      else
          export PATH=&quot;/Users/connor/opt/anaconda3/bin:$PATH&quot;
      fi
  fi
  unset __conda_setup
  # &lt;&lt;&lt; conda initialize &lt;&lt;&lt;
  </code></pre>