I had changed the default user role name for 'contributor' using following code in the theme function file
global $wp_roles;
if ( ! isset( $wp_roles ) )
$wp_roles = new WP_Roles();
$wp_roles->roles['contributor']['name'] = 'New_Name';
$wp_roles->role_names['contributor'] = 'New_Name';
Now I want to undo it as I find that it would be more appropriate to create a new user role through a plugin instead of changing existing user role name. First I removed the function. But the the new name I had assigned to the 'contributor' role still appeared in role list along with 'Contributor'. Then I tried 'remove_role()' function in a plugin.
function remove_role_on_plugin_activation() {
$wp_roles = new WP_Roles();
$wp_roles->remove_role('New_Name');}
register_activation_hook( __FILE__, 'remove_role_on_plugin_activation' );
But the role 'New_Name' still appears in roles drop down list in the back end.
Any suggestions?