To avoid this situation in the future, browse the MERGE keyword in Cypher. Unfortunately, as far as I know, there is nothing like this in Cypher (yet):
MATCH (n:MyNode),(m:MyNode) WHERE ID(n) <> ID(m) AND PROPS(n) IN PROPS(m) AND PROPS(m) IN PROPS(n) (...) DELETE (...)
The fictional third-line PROPS function is not part of the Cypher language, and custom functions have not yet entered Neo4j.
If you are not working with production instances, the easiest way is to create a backup copy of the data folder and try to start it (using MERGE).
Otherwise, you can also write a workaround to collect duplicates and remove them in batch mode (here is an example using the REST API).
source share