---
source_url: https://www.pubnub.com/docs/chat/unity-chat-sdk/build/features/channels/delete
title: Delete channels
updated_at: 2026-05-22T11:04:36.944Z
---

> 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

Permanently remove a channel from [App Context](https://www.pubnub.com/docs/sdks/unity/api-reference/objects) storage 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.

:::warning Soft delete deprecated
Soft deletion for channels has been deprecated. `Delete()` now always performs a hard delete. Use `Delete()` without any parameters to permanently remove a channel. The `soft` parameter and `Restore()` method are no longer available for channels.
:::

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

### Method signature

These methods take the following parameters:

* Delete() (on the Channel object) 1channel.Delete()
* DeleteChannel() (on the Chat object) 1chat.DeleteChannel(string channelId)

#### Input

| Parameter | Required in Delete() | Required in DeleteChannel() | Description |
| --- | --- | --- | --- |
| channelId | string | Optional |  | No | Yes | Unique channel identifier. |

#### Output

| Type | Description |
| --- | --- |
| `Task<ChatOperationResult>` | Returned `Task` that you can `await` to get the result of the delete operation. |

### Sample code

Permanently delete the channel with the ID of `support`.

* Delete() (on the Channel object) using System.Threading.Tasks; using PubnubApi; using PubnubChatApi; using UnityEngine; // Configuration PubnubChatConfig chatConfig = new PubnubChatConfig(); PNConfiguration pnConfiguration = new PNConfiguration(new UserId("myUniqueUserId")) { SubscribeKey = "demo", PublishKey = "demo", Secure = true }; // Initialize Unity Chat var chatResult = await UnityChat.CreateInstance(chatConfig, pnConfiguration); if (!chatResult.Error) { chat = chatResult.Result; } var channelResult = await chat.GetChannel("support"); if (channelResult.Error) { Debug.Log("Channel to delete doesn't exist."); return; } var channel = channelResult.Result; await channel.Delete();
* DeleteChannel() (on the Chat object) using System.Threading.Tasks; using PubnubApi; using PubnubChatApi; using UnityEngine; // Configuration PubnubChatConfig chatConfig = new PubnubChatConfig(); PNConfiguration pnConfiguration = new PNConfiguration(new UserId("myUniqueUserId")) { SubscribeKey = "demo", PublishKey = "demo", Secure = true }; // Initialize Unity Chat var chatResult = await UnityChat.CreateInstance(chatConfig, pnConfiguration); if (!chatResult.Error) { chat = chatResult.Result; } await chat.DeleteChannel("support");