How to purge all vertices and edges from a tigergraph database?

What would be the correct way to purge all vertices and edges from a tigergraph database please?

Any standard endpoint? How to configure?

Anyone have a custom query?


1 Like

There are a couple of options. If you are running the Developer version, then simply change the schema and publish it, it automatically purges the database.

A more normal way to do it is to go into Graph Studio -> Load Data and look for the waste bin icon at the top of the screen.

I don’t think there is a REST endpoint for that function. I’ll have a look and get back here if I find it.


Richard Henderson

OK, there is this:

You’ll need to iterate through each of your vertex types, but otherwise it will do what you want.



Jon, there has got to be a better way to do this. In development, there are many times people need to clear the data and reload it without rebuilding the schema. They need to be able to do it quickly.

(Schema rebuilds in TG usually take a minute or more. This is an issue in itself. Why do schema rebuilds take so long? Why are they necessary? Could this be reworked to make schema changes more performant.)

Cypher allows users to clear a graph with a command like

This simply detaches and removes all relationships and then deletes all of the nodes.

Isn’t there possibly some way to do something like this in GSQL with TigerGraph using DELETE statements? Is there a way to specify the universal deletion of all relationships (of all types) and all nodes (of all types)?

TigerGraph is so powerful in so many areas. It seems like many users would benefit from some simple function that clears the graph quickly without forcing a schema rebuild.

@anthony.gatlin how about clearing the graph store?



Thank you, @Bruno! This is perfect!

1 Like