How do I programmatically remove one breadcrumb link? in Drupal 7 I could just use array_pop($breadcrumb), but in Drupal 8 the breadcrumb is an object and I don't see a method for removing the last element.

How can this be done?
Drupal 7 and Drupal 8 are more or less the same in some aspects.

If you use preprocess_breadcrumb in your theme, you would do

function my_theme_preprocess_breadcrumb(&amp;$variables) {
  array_pop($variables['breadcrumb']);
  ...
}


You could also solve this in the template file, by skipping the first item in {{ breadcrumb }}

If you want module only solution, you could swap the breadcrumb service with your own thing.