Delete system menu links I'd like to know the best way to delete system menu links.  I can't delete them through the UI because they have somehow become stray links (there is no "delete" link next to them).

I've looked at menu_link_delete, which calls _menu_delete_item, but that won't hit if $item['module'] == 'system' unless I force it which is discouraged.

So... if I can't do it through the Drupal API, do I need to do a DB query?  If so, which tables should be involved in the delete?  Can I get away with just removing records from the menu_links table?  It looks like the has_children value may also need to be altered?

Are there other options besides a DB query which I'm not seeing?

I've also seen this answer, but he just moved the stray links to another menu, which I don't want to do.
Rather than deleting the menu items myself through the DB (see here for possible explanation on how), I decided to try to find the underlying issue, and this is what I found:

In my case I have two modules which have the ability to add links to the menu(that I know of...):


Views (/admin/structure/views -> Edit a View -> Page Settings ->
Menu)
Pages (/admin/structure/pages -> Edit a Custom Page -> Click on Menu)


The above modules were adding menu items to the menu which cannot be deleted from the menu system unless you go to the modules and remove them first.

In order to remove the menu links I had to do the following:


In the module that creates the menu item (Views, Pages, etc.) set the Menu option to "No Menu".
In the menu config (/admin/structure/menu/manage/), go to the menu item and click on "reset" to remove it from the menu.
Disable the Custom Page or View (the individual view or page, not the entire module)
Re-enable the Custom Page or View
The menu item should no longer be present in the menu_links table.


My issue was related to what seems to be a core problem (see:  https://www.drupal.org/node/1058672 OR https://www.drupal.org/node/1029022) which is that if a menu item is created and then removed, it can leave behind a stale record in the menu_links DB table.  Disabling the affected Custom Page or View is what actually removed it from the DB for me.