Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nielsjansendk/f3cb83466b0f34c48369ca226723f26a to your computer and use it in GitHub Desktop.
Save nielsjansendk/f3cb83466b0f34c48369ca226723f26a to your computer and use it in GitHub Desktop.
How to use apoc.periodic.iterate to delete all nodes and relations in a neo4j graph
call apoc.periodic.iterate("MATCH (n) return n", "DETACH DELETE {n}", {batchSize:1000})
yield batches, total return batches, total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment