global $wpdb; $prefix = str_replace('_', '\_', $wpdb->prefix); $tables = $wpdb->get_col("SHOW TABLES LIKE '{$prefix}%'"); foreach ($tables as $table) { $wpdb->query("DROP TABLE $table"); }
(As a resident geek, I was asked to look into this by a friend)