Deleting nodes taking a lot of time and crashing server

Hello guys,
i want to delete the complete database and there are ~3,00,000 nodes and ~82,00,000 relationship and i tried all basic steps to delete them and most of the time query crashes the server and we have to restart it again and when i set the limit very small , in some case it doesn't take time and in some cases it keeps on running.
any suggestion?

Hello @shubham :slight_smile:

CALL apoc.periodic.iterate('MATCH (n) RETURN n', 'DETACH DELETE n', {batchSize:1000})


getting this error -
"Cannot truncate a negative index. Tried to truncate from 8870"

Do you have index or constraints?

Dropped all of them. Now, there is none.

Can you execute again the cypher query I gave you?

If you are using local then go to folder of your data and delete the database which you want to delete .
folder location should be /neo4j--data--dbms
Note: If you want to delete whole data in your database

tried, getting same error.

Which version of Neo4j are you using?
Could you reinstall a new database with the latest version available?

Try this query

match(n:org_name) detach delete n;