How to delete all data in neo4j?
To clear all data in the Neo4j database, you can follow these steps:
- Stop the Neo4j instance to ensure the database is not running.
- Locate the data storage location of the Neo4j database. This is typically found in the “data” folder within the Neo4j installation directory. You can find the correct path by checking the dbms.directories.data property in the Neo4j configuration file (neo4j.conf).
- Locate the folder named “graph.db” in the data storage location. This is the folder where the actual data is stored.
- Delete the “graph.db” folder, or rename it to a different name for backup purposes.
- Start a Neo4j instance. At this point, Neo4j will create a new, empty database.
Please note that this will permanently delete all data in the database, including nodes, relationships, and properties. Before performing this operation, please make sure to backup important data to prevent any loss.