How to disable Toolbar on certain pages / theme? Before deprecation of hook_page_build/hook_page_build_alter() we used good old method:

$page['page_top']['toolbar']['#access'] = FALSE;


(Source)

It disabled Toolbar for specific route in specific theme.  

Now I checked hook_page_top(), hook_toolbar() and hook_preprocess_page(). Nothing helped, so I temporarily removed {{ page_top }} region from my html.html.twig but it doesn't look as the right approach.
page_top and page_bottom are still available, but on html.html.twig. template_preprocess_html() initializes those variables with the following code.

  $variables['page_top'] = NULL;
  if (isset($variables['html']['page_top'])) {
    $variables['page_top'] = $variables['html']['page_top'];
    unset($variables['html']['page_top']);
  }
  $variables['page_bottom'] = NULL;
  if (isset($variables['html']['page_bottom'])) {
    $variables['page_bottom'] = $variables['html']['page_bottom'];
    unset($variables['html']['page_bottom']);
  }


Since toolbar_page_top() uses the following code, I take you can use hook_preprocess_html() to avoid the toolbar appears.

  $page_top['toolbar'] = array(
    '#type' =&gt; 'toolbar',
    '#access' =&gt; \Drupal::currentUser()-&gt;hasPermission('access toolbar'),
    '#cache' =&gt; [
      'keys' =&gt; ['toolbar'],
      'contexts' =&gt; ['user.permissions'],
    ],
  );


Bear in mind that a note on Added hook_page_attachments(_alter)() and removed hook_page_build/alter() says:


  You no longer can change $page['content'] (or, generally speaking, $page[$region_name]) into something completely different.