Duplicate menu entries in Drupal 7's admin_menu module

The Drupal 7 version of admin_menu isn't done yet, and once in a while you'll get an admin menu full of stupid duplicate links, like so:

Here's a sql query that will find and delete the offending duplicates for you (use at your own risk):

  1. DELETE FROM menu_links WHERE mlid IN (SELECT duped_ids.mlid FROM (SELECT max(mlid) AS mlid, menu_name, link_title, link_path, router_path, module, count(*) FROM menu_links GROUP BY menu_name, link_title, link_path, router_path HAVING count(*) > 1) AS duped_ids)