title: Remove old remote branches from Git
body: <p>When I use bash autocompletion in Git, it keeps showing me branches of old remotes that I don't have anymore. When I do a <code>git branch -la</code> it shows those old remotes and branches while a <code>git branch -l</code> won't. A <code>ls .git/refs/remotes/</code> also shows them. However, they are not present in my <em>.git/config</em> and neither are they shown when I run <code>git remote show</code>.</p>
  
  <p>So how do I get rid of them because my autocomplete list is too long right now. </p>
  
  <p>I have already tried:</p>
  
  <pre><code>git reflog expire --expire=now --all
  git gc --prune=now
  rm .git/refs/remotes/theoldremote
  git remote prune theoldremote
  </code></pre>
  
  <p>I'm also aware of the fact that I can just re-clone the repo but that's just cheating ;-)</p>