I know this question is asked by many people already
for my research, here's some questions asked before
But after all, still can't solve our problems,
we just want to delete "ALL" nodes and "ALL" relationships
suppose delete "ALL" can see there are left 0 nodes 0 properties and 0 relationships
This is the screenshot i took after executing the delete "ALL" suggested by forum
My question still the same, how do delete all nodes and all relationships in neo4j
Deleting relationship is as simple as deleting nodes. Use the MATCH statement to match the relationships you want to delete. You can delete one or many relationships or all relationships by using one statement.
In Neo4j to delete a node or relations between nodes you have to use DELETE clause. To delete any node you need DELETE clause with the MATCH statement, the MATCH statement data will find the specific node and whichever node is matched with the statement that node will be vanished.
As of 2.3.0 and up to 3.3.0
MATCH (n) DETACH DELETE n
Docs
Pre 2.3.0
MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r
Docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With