Delete bulk branches in multiple projects at once

I have 100 got repositories and all of them have many branches, out of which most of them starts with “Sam”. Can I deleted all such branches at once residing in multiple projects.

I would like to delete all the branches that starts with Sam* and older than 6 months from all the projects/repositories at single shot.

How can we achieve it.

Thank you in advance!