$ ./guess_the_languageGit
Git · medium · #60

Which command removes the stale origin/old?

$ git branch -r
  origin/main
  origin/old
# 'old' was deleted on the server
  1. git branch -d old
  2. git fetch --prune
  3. git remote update old
  4. git pull --no-tags
--prune deletes remote-tracking refs whose branches no longer exist on the remote. git branch -d old targets a local branch.
Play Git ▸