In this recipe, we will learn how to delete nodes and relationships from Neo4j. This recipe can be used to delete all nodes/relations or subsets of them.
To step through this recipe, you will need to create some nodes and relationships among them to get the most from this recipe.
We have divided this recipe into the following problem sets:
MATCH (n)-[r]-() DELETE r
MATCH (n) DELETE n
The preceding query will only work if there are no relationships in the graph.
MATCH (n) WHERE n.city = "Atlanta" DELETE n # You have to delete all ...