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

# DROP SOURCE

> Use the `DROP SOURCE` command to remove a [source](/sql/commands/sql-create-source) if you no longer need the data inflow from the source.

Before you can remove a source, you must use [DROP MATERIALIZED VIEW](/sql/commands/sql-drop-mv) to remove all its dependent materialized views.

## Syntax

```sql theme={null}
DROP SOURCE [ IF EXISTS ] [schema_name.]source_name [ CASCADE ];
```

## Parameters[](#parameters "Direct link to Parameters")

| Parameter          | Description                                                                                                                                                                                                                                            |
| :----------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *schema\_name*     | The schema of the source that you want to remove. You can use [SHOW SCHEMAS](/sql/commands/sql-show-schemas) to get a list of all available schemas. If you don't specify a schema, the specified source in the default schema public will be removed. |
| *source\_name*     | The name of the source to remove.                                                                                                                                                                                                                      |
| **CASCADE** option | If this option is specified, all objects (such as materialized views) that depend on the source, and in turn all objects that depend on those objects will be dropped.                                                                                 |

## Examples

This statement removes the `rw_source` source in the default schema (`public`) from the database:

```sql theme={null}
DROP SOURCE rw_source;
```

This statement removes the `rw_source` source in the `rw_schema` schema from the database:

```sql theme={null}
DROP SOURCE IF EXISTS rw_schema.rw_source;
```

## Hanging or long running `DROP SOURCE`

If your `DROP SOURCE` command takes a long time to run, it could be due to high barrier latency. `DROP` commands need to be synchronized with barriers currently. To let `DROP` take effect immediately, you can use the `RECOVER` command in a separate session.

## See also

<CardGroup>
  <Card title="CREATE SOURCE" icon="circle-plus" icontype="solid" href="/sql/commands/sql-create-source">
    Create a source
  </Card>
</CardGroup>
