Neo4j - How to to remove all data from neo4j?

Hi,

I am learning neo4j. I have created few nodes and links. Now I want to delete all of them. How to delete all nodes, links and properties from a Neo4j database?

Thanks

View Answers

May 20, 2015 at 3:48 AM

Hi,

You can use the following query:

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

This query will delete all the data (nodes, links, properties) from a neo4j database.

Thanks









Related Tutorials/Questions & Answers:
Advertisements