Q:

How to completely wipe and rebuild drupal menus?

A while ago I found a cool blog post that detailed how to empty the menu tables, and rebuild the menu system with a drush php call, a necessity since the site will be unusable after emptying those mysql tables. This way, you could reset your menus like it was a new Drupal site.
Can anyone detail this technique or do you have the link for that blog?

A:

I have been looking a while for a solution to the problem to rebuild Drupal menus until I stumbled upon a Drupal issue that helped me. My solution (in a php script) is the following:
db_query("DELETE FROM {menu_links} WHERE module = 'system'");
db_query("DELETE FROM {menu_links} WHERE menu_name = 'management'");
menu_rebuild();

This could also be done by entering the queries through phpmyadmin or something alike:
DELETE FROM {menu_links} WHERE module = 'system'
DELETE FROM {menu_links} WHERE menu_name = 'management'

And then rebuilding the menu structure. If you use the devel module, you can achieve that by visiting the page /devel/menu/reset. I you don't have the devel module, I'm not sure how to rebuild the menu structure.
Don't forget to backup your database before you try this.

A:

I have answered this question here 
How do I call the menu_rebuild function in Drupal 7?
It worked for me just fine.

