git fetch and fetch prune code example
Example: git fetch prune
git fetch --prune #is the best utility for cleaning outdated branches. It will connect to a shared remote repository remote and fetch all remote branch refs. It will then delete remote refs that are no longer in use on the remote repository