Programmatically delete pathauto alias pattern? I know how to remove a pattern via the UI. Is it possible to do this programmatically to be used in hook_update()?

EDIT: I think asking this answered my question. Will post a followup answer. Probably just entity_load/entity::delete
Ended up throwing the following into my_module.install

/**
 * Deletes the product_nodes path alias. Check watchdog for error in case of failure.
 */
function my_module_update_8001(){
  $alias_id = 'product_nodes';
  if($alias_entity = Drupal\pathauto\Entity\PathautoPattern::load($alias_id)){
    try{
      $alias_pattern = $alias_entity-&gt;getPattern();
      $alias_entity-&gt;delete();
      return t('Successfully deleted @id PathAuto pattern. If this was done in error, you can recreate it by using the pattern: @pattern.',
        array(
          '@id'=&gt;$alias_id,
          '@pattern'=&gt; $alias_pattern,
        )
      );
    } catch(Exception $e){
      \Drupal::logger('my_module')-&gt;error('Encountered the following error while trying to delete the @id path alias pattern: @error',
        array(
          '@id'=&gt;$alias_id,
          '@error'=&gt;$e-&gt;getMessage(),
        )
      );
      return 'Failed to delete @id PathAuto pattern. Check the error log for details.';
    }
  } else {
    return t('No PathAuto pattern found with the ID @id.',
      array(
        '@id'=&gt;$alias_id,
      )
    );
  }
}