Yeah you can do.
For Approach 1, you can get sample code here to remove role from one user profile. You can enhance this code to remove role from all users profile and then delete the role using Terminator.
Even you can try approach 2 through code.