neo4j Deletion


Example

Delete all nodes

MATCH (n) 
DETACH DELETE n

DETACH doesn't work in older versions(less then 2.3), for previous versions use

MATCH (n)
OPTIONAL MATCH (n)-[r]-()
DELETE n, r

Delete all nodes of a specific label

MATCH (n:Book) 
DELETE n