Sometimes we may not notice that the local branches are increasing and manually deleting branches one by one can take much time.
You can use the below code snippet in terminal to Delete all the local branches but keep the master
$ git branch | grep -v "master" | xargs git branch -D