To get list of merged branches:
git branch --merged develop
git branch --merged master
To delete all merged branches while asking approval for each branch: (be careful not to delete important branches like develop, staging or master)
git branch --merged develop | xargs -n 1 -p git branch -d