Search code examples
cyphergraph-databasesmemgraphdb

How can I delete all of the nodes and relationships from the Memgraph database?


I want to delete all of the nodes and relationships from the Memgraph database. I know that could create a whole instance, but I don't want to do that.

Which Cypher query can I use to delete the content of the Memgraph database?


Solution

  • To delete all nodes and relationships from your Memgraph database use the following Cypher query:

    MATCH (n)
    DETACH DELETE n;