Drupal 7 delete views programmatically

Hi when we need to delete views we can use code below. We can place it in hook_update_N().

Thank you for reading!

  ctools_include('export');
  $view = ctools_export_crud_load('views_view', 'view_machine_name');
  $view->delete();