How to delete all local branches which has been deleted on the remote git fetch --prune fetch - fetch all remote changes --prune - delete local branches that are no longer exists on the remote