Kibana version: 5.6.0 latest snapshot
Elasticsearch version: 5.6.0 latest snapshot
Server OS version: darwin_X86_64
Browser version: chrome latest
Browser OS version: OS X
Original install method (e.g. download page, yum, from source, etc.): snapshot build
Description of the problem including expected versus actual behavior: I manually created metricbeat index pattern, checked the data on discover and then loaded beats dashboards. This created a duplicate metricbeat-* indexpattern in Kibana.
Steps to reproduce:

Trying to get this going in 5.4.0 to see whats the behaviour
In 5.4.0: (you have to set ulimit -n 2048 to import dashboards) - I did this:
We could handle this on the dashboard import API, and when an index pattern doesn't exist we can see if something else with the same pattern exists. The one caveat is you can't search for it if it contains a dash. We might have to bring down all of them and search the array.
Not sure if it falls under this bug, but I'm seeing the same pattern duplication with 6.3 writing to /api/saved_objects/index-pattern/. If I run the POST multiple times, I'll get multiple copies of the same index.
Example CURL:
## Insert Saved Objects
curl -X "POST" "http://localhost:5601/api/saved_objects/index-pattern/" \
-H 'Content-type: application/json' \
-H 'kbn-xsrf: true' \
-d $'{
"attributes": {
"fields": "[{\\"name\\":\\"jenkins_timestamp\\",\\"type\\":\\"string\\",\\"count\\":0,\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true}]",
"timeFieldName": "@timestamp",
"title": "jenkins-master-*",
"fieldFormatMap": "{\\"@timestamp\\":{\\"id\\":\\"date\\"}}"
}
}'
Will create a new copy of jenkins-master-* each run. Maybe my content is malformed?
@elastic/kibana-platform
Has there been a workaround identified for when this happens? How do we know which index pattern to delete? This is 7.4.0

I have an ugly workaround for that, that I used in a space with many duplicated dashboards:






Worked for me on Kibana 7.6.2.
If you have a better solution, I'be happy to know :-)
Cheers
Most helpful comment
Has there been a workaround identified for when this happens? How do we know which index pattern to delete? This is 7.4.0
