Technical information on this site may be out of date : no updates since 2015

Delete Drupal View programatically

July 2 2010 : posted under drupal api

Quick function to delete a view.

This is basically what the UI form submit does.


function delete_view($name) {

	$view = views_ui_cache_load($name);
	$view->delete();
	views_object_cache_clear('view', $view->name);

}