DETACH DELETE n doesn't wipe out everything in the brower


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.

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

Yes. The labels are wiped out by the command, but properties still stay there.

Hello @lingvisa :slight_smile:

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 :slight_smile:


1 Like