Gremlin remove all Vertex
问题 I know how to remove a vertex by id, but I need to delete multiple vertices (clean the db). Deleting 1 v is like this: ver = g.v(1) g.removeVertex(ver) 回答1: you can try g.V.each{g.removeVertex(it)} g.commit() 回答2: In more recent terms as of Gremlin 2.3.0, removal of all vertices would be best accomplished with: g.V.remove() UPDATE: For version Gremlin 3.x you would use drop(): gremlin> graph = TinkerFactory.createModern() ==>tinkergraph[vertices:6 edges:6] gremlin> g = graph.traversal() ==