Developers can use admin_bar_menu action to remove items from WordPress admin bar or toolbar.
add_action('admin_bar_menu', 'remove_wp_logo_from_admin_bar', 999);
function remove_wp_logo_from_admin_bar( $wp_admin_bar ) {
$wp_admin_bar->remove_node('wp-logo');
}
Above code removes WordPress logo from the admin bar. All you need to do is paste the code inside your functions.php file.
The parameter passed to remove_node method is the ID of the node you wish to remove. ID's can be found in the HTML source code of WordPress page with a Toolbar on it. For example, the li element's ID for the WordPress Logo on the left in the Toolbar is "wp-admin-bar-wp-logo":
<li id="wp-admin-bar-wp-logo" class="menupop"> … </li>
Remove "wp-admin-bar-" from the li's ID to get the ID of node. From this example the node ID is "wp-logo".
You can use browser inspector tools to find out the node ID's of various items or nodes on your admin bar.