Hide the  item in the main menu I want to remove the link to the homepage from the main menu.

I can delete it with:

menu_link_delete(NULL, "&lt;front&gt;");


But I am worried about needing to undo that at some point in the future, or causing problems when some module expects that link to exist.

It looks like menu_link_save allows marking a menu item as "hidden", but I can't figure out how to get the mlid so that it knows I want to edit an existing menu item.

I have tried calling menu_main_menu, but the result doesn't appear to have a main_menu['&lt;front&gt;'] element.

Any suggestions?
Using the Features module let me export the menu, at which point it was easy to set 'hidden' => '1' on the 'main-menu:' link.