Delete Git Branches by Days Ago

Sunday, January 25, 2026
This is a repost from my old blog. First posted in 9/5/2024.

Often my branches piled up and I need a way to automatically delete them based on how many days ago. I can't find an easy way online, so I ended up writing my own scripts in PowerShell and Bash. In this repo, I have the script to clean up branches that are 90 days or older based on last committed date.


Repo: https://github.com/nik-yo/DeleteGitBranchesByDaysAgo