---
source_url: https://www.pubnub.com/docs/chat/chat-sdk/build/features/channels/delete
title: Delete channels
updated_at: 2026-06-26T11:03:04.653Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Delete channels

Remove a channel permanently with `delete()` or `deleteChannel()`.

Both methods produce the same result. Call `delete()` on a `Channel` object or `deleteChannel()` on the `Chat` object with the channel ID.

:::note Requires App Context
Enable [App Context](https://youtu.be/9UEoSlngpYI) for your keyset in the [Admin Portal](https://admin.pubnub.com/).
:::

### Method signature

##### Under the hood

`delete()` and `deleteChannel()` call PubNub App Context API and the JavaScript SDK [removeChannelMetadata()](https://www.pubnub.com/docs/sdks/javascript/api-reference/objects#remove-channel-metadata) method.

These methods take the following parameters:

* delete() 1channel.delete(): Promise<true>
* deleteChannel() 1chat.deleteChannel(id: string): Promise<true>

#### Input

| Parameter | Required in delete() | Required in deleteChannel() | Description |
| --- | --- | --- | --- |
| id | string | Optional |  | No | Yes | Unique channel identifier. |

#### Output

| Type | Description |
| --- | --- |
| `Promise<true>` | For `delete()`, a confirmation that the channel metadata was permanently deleted. |
| `Promise<true>` | For `deleteChannel()`, a confirmation that the channel metadata was permanently deleted. |

#### Errors

Whenever the channel ID is required, and you try to delete a channel without providing its ID, you will receive the `ID is required` error.

### Sample code

Permanently delete the `support` channel metadata.

* delete() 1// reference the "channel" object2const channel = await chat.getChannel("support")3// permanently delete the channel4await channel.delete()
* deleteChannel() 1// reference the "chat" object and invoke the "deleteChannel()" method2const channel = await chat.deleteChannel("support")