Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-06-2020 01:52 PM
MATCH (n)
DETACH DELETE n
This removes all labels and relationships in the graph. But in the browser, label and property names are still there. It doesn't hurt too much. Is there a way to get rid of any trace in the old graph? I usually remove and re-create the database files from the data/databases directory.
Just curious.
11-06-2020 06:40 PM
Hi @lingvisa,
Apart from deleting nodes and relationships you need to delete all indexes and constrains you created on top of those. The easiest way is by using the apoc library
CALL apoc.schema.assert({},{},true) YIELD label, key
RETURN *
11-06-2020 08:55 PM
Yes. The labels are wiped out by the command, but properties still stay there.
11-07-2020 03:20 AM
Hello @lingvisa
I advice you to also use APOC to delete nodes and relationships:
CALL apoc.periodic.iterate('MATCH (n) RETURN n', 'DETACH DELETE n', {batchSize: 1000})
@alexandra gave you the right way to delete indexes.
But you cannot delete properties. The only way right now is to create a new database
Regards,
Cobra
All the sessions of the conference are now available online