Our developers have a bad habit of not deleting the branches after they merge into develop or a release. So trying to figure away to check either last time accessed or just date created so we can notify them of old branches that needed deleted.
Great question/request. There are a few ways to achieve this.
1. When a PR is merged Bitbucket Server offers to delete the source branch after the merge.
2. Add an existing hook by clicking 'Add Hook' in your repo settings  and find a suitable hook on the Atlassian Marketplace
3. Write your own PostReceiveHook (called after merge) 
Let me know if you need any further guidance. We at Izymes have made an add-on that takes care of shaping your development and merge process from start to finish - it's called Workzone. Among a lot of other things can take care of deleting the source branch after merge. You can configure that on a branch-by-branch basis, you don't want to delete `develop` when it is merged to `release` for example :-)
I can see how this relates to your previous question.
The repository owner may choose to implement a policy (see above) to delete merged branches right after they have been merged. As this only happens on the server, but not on the developers' machine, developers can still maintain a local branch, if they choose to. Then it is the developers' responsibility to declutter local branches that have been merged, but not yours.
As my father used to say: "Trust is good, control is better." LOL
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events