This script is based on explanation from https://gist.github.com/wowods/020197fa2d3ac0e411241479d8950b43.
Since remembering those commands is quite cumbersome, especially for a command that not used daily, so I make this script to make my life a little bit easier.
To use it, save the script below on your computer and run it on your git folder with argument -d to start deleting all the old brances.
If you want to check which branch that will be deleted, you could use argument -l.