Is there a fast way to completely clear a Neo4j 5.11 database, removing all nodes, relationships, and properties? Looking for steps or a command to reset the database efficiently.
create or replace database databaseName
1 Like
@glilienfield thanks
@artem.gurskiy .. @glilienfield response is described in the documentation at
and specifically
Second, adding OR REPLACE to the command results in any existing database being deleted and a new one being created.
Query
CREATE OR REPLACE DATABASE customers
This is equivalent to running DROP DATABASE customers IF EXISTS followed by CREATE DATABASE customers.
2 Likes