How to delete a view programatically in D7? How to delete a view programatically?

It's crazy I can't find proper answer for such a simple question.
Give a try to the following code to delete the view:

// Check the view id the one that you are looking for.
if ($view = views_get_view($name)) {
  // Delete the view if it is the one that you are looking for.
  views_delete_view($view);
}