aboutsummaryrefslogtreecommitdiffstats
path: root/ydb/docs/en/core/reference/ydb-cli/topic-drop.md
blob: e3bce7884f304d584829c184c465fcc7f572bfb3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Deleting a topic

You can use the `topic drop` subcommand to delete a [previously created](topic-create.md) topic.

{% note info %}

Deleting a topic also deletes all the consumers added for it.

{% endnote %}

General format of the command:

```bash
{{ ydb-cli }} [global options...] topic drop <topic-path>
```

* `global options`: [Global parameters](commands/global-options.md).
* `topic-path`: Topic path.

View the description of the delete topic command:

```bash
{{ ydb-cli }} topic drop --help
```

## Examples {#examples}

{% include [ydb-cli-profile](../../_includes/ydb-cli-profile.md) %}

Delete the [previously created](topic-create.md) topic:

```bash
{{ ydb-cli }} -p db1 topic drop my-topic
```