function mytheme_admin_bar_render() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wp-logo');
}
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );
For specific user roles you can wrap the add_action
in a conditional, something like
if(current_user_can('editor')){
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );
}