> ## Documentation Index
> Fetch the complete documentation index at: https://docs.falkordb.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> FalkorDB is a graph database that speaks the Redis protocol. Queries are issued as OpenCypher through the GRAPH.QUERY and GRAPH.RO_QUERY commands, not over Bolt or a SQL connection.
> FalkorDB implements a subset of OpenCypher with proprietary extensions. Do not assume Neo4j-only syntax or procedures are available — check /cypher/cypher-support and /cypher/known-limitations before using a clause.
> FalkorDB is the successor to RedisGraph, but they are separate products. Do not present RedisGraph commands, versions, or limitations as current FalkorDB behavior.
> Use the official clients listed in /getting-started/clients rather than generic Redis or Neo4j drivers, and prefer the language the user is already working in.
> Configuration parameters are set with GRAPH.CONFIG SET or at startup; cite the exact parameter name from /getting-started/configuration rather than inventing one.
> This site covers four products: FalkorDB (core), FalkorDB Cloud, FalkorDB Enterprise, and the GraphRAG SDK. Name which one an answer applies to, since setup and operations differ.

# GRAPH.DELETE

> Completely remove a graph and all its entities (nodes and relationships) from FalkorDB using the GRAPH.DELETE command with examples for multiple programming languages.

Completely removes a graph and all of its entities (nodes and relationships).

## Syntax

```text theme={null}
GRAPH.DELETE graph_name
```

**Arguments:**

* `graph_name` - Name of the graph to delete

**Returns:** String indicating if the operation succeeded or failed.

## Examples

<CodeGroup>
  ```python Python theme={null}
  graph.delete()
  ```

  ```javascript JavaScript theme={null}
  await graph.delete();
  ```

  ```java Java theme={null}
  graph.delete();
  ```

  ```rust Rust theme={null}
  graph.delete()?;
  ```

  ```bash Shell theme={null}
  GRAPH.DELETE us_government
  ```
</CodeGroup>

## Deleting Individual Nodes

**Note:** To delete specific nodes or relationships (not the entire graph), use the Cypher `DELETE` clause with a `MATCH` query:

<CodeGroup>
  ```python Python theme={null}
  graph.query("MATCH (x:Y {propname: propvalue}) DELETE x")
  ```

  ```javascript JavaScript theme={null}
  await graph.query("MATCH (x:Y {propname: propvalue}) DELETE x");
  ```

  ```java Java theme={null}
  graph.query("MATCH (x:Y {propname: propvalue}) DELETE x");
  ```

  ```rust Rust theme={null}
  graph.query("MATCH (x:Y {propname: propvalue}) DELETE x")?;
  ```

  ```bash Shell theme={null}
  GRAPH.QUERY DEMO_GRAPH "MATCH (x:Y {propname: propvalue}) DELETE x"
  ```
</CodeGroup>

**⚠️ Warning:** When you delete a node using the Cypher `DELETE` clause, all of the node's incoming and outgoing relationships are also automatically removed.

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Can I undo a GRAPH.DELETE operation?">
    No. `GRAPH.DELETE` permanently removes the entire graph and all its data. There is no undo. Make sure to back up your data before deleting a graph.
  </Accordion>

  <Accordion title="What is the difference between GRAPH.DELETE and the Cypher DELETE clause?">
    `GRAPH.DELETE` removes the **entire graph** key and all its entities. The Cypher `DELETE` clause within a `GRAPH.QUERY` removes specific nodes or relationships matched by a pattern.
  </Accordion>

  <Accordion title="Does GRAPH.DELETE block other operations?">
    The delete operation acquires a write lock on the graph. Any queries running against the graph will complete before the deletion proceeds, but new queries will be blocked until the deletion finishes.
  </Accordion>

  <Accordion title="What happens to relationships when I delete a node with Cypher DELETE?">
    All incoming and outgoing relationships connected to the deleted node are automatically removed. You do not need to delete them separately.
  </Accordion>
</AccordionGroup>
