How to programmatically delete a display from a view Is it possible to programmatically delete a display from a view?

The view object has numerous member functions related to displays (add_display, attach_displays, choose_display, set_display, new_display, etc.) and I can also disable a display like this:

&lt;?php
  $view_name = "faq";
  $display_name = "page_1";
  $view = views_get_view($view_name);
  $view-&gt;display[$display_name]-&gt;display_options['enabled'] = FALSE;
  views_save_view($view);
?&gt;


But I can't see how I can remove the display completely. Can anyone advise? Thanks!
This is how you do it. It is how it is done in views_ui_edit_view_form_submit() when you delete a display via the admin UI:

unset($view-&gt;display[$display_name]);