There is a function called views_delete_view, that does just that. The only thing is that views_delete_view() function in Drupal 7 takes a view object as its argument, not a machine name.
Source code viewer
$view = views_get_view(your_view_name); views_delete_view($view);Programming Language: PHP