> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-rn-guide-message-privately.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete A Group

> Delete a group permanently using the CometChat React Native SDK. Only group admins can perform this operation.

<Accordion title="AI Integration Quick Reference">
  ```javascript theme={null}
  // Delete a group (owner only)
  await CometChat.deleteGroup("GUID");
  ```

  **Requirement:** Logged-in user must be the owner of the group.
</Accordion>

Permanently delete a group and all its messages. Only the group owner can perform this operation.

<Warning>
  This operation is irreversible. Deleted groups and their messages cannot be recovered.
</Warning>

## Delete a Group

Use `deleteGroup()` with the group's GUID.

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    const GUID: string = "GUID";

    CometChat.deleteGroup(GUID).then(
      (response: boolean) => {
          console.log("Group deleted successfully:", response);
      }, (error: CometChat.CometChatException) => {
          console.log("Group delete failed with exception:", error);
      }
    );
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    const GUID = "GUID";

    CometChat.deleteGroup(GUID).then(
    response => {
      console.log("Groups deleted successfully:", response);
    }, error => {
      console.log("Group delete failed with exception:", error);
    }
    );
    ```

    Alternatively, you can use the `async/await` syntax:

    ```javascript theme={null}
    const GUID = "GUID";

    try {
      const response = await CometChat.deleteGroup(GUID);
      console.log("Group deleted successfully:", response);
    } catch (error) {
      console.log("Group delete failed with exception:", error);
    }
    ```
  </Tab>
</Tabs>

The `deleteGroup()` method takes the following parameters:

| Parameter | Description                                    |
| --------- | ---------------------------------------------- |
| `GUID`    | The GUID of the group you would like to delete |

On success, the method resolves with `true` (boolean).

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Create a Group" icon="plus" href="/sdk/react-native/create-group">
    Create public, private, or password-protected groups
  </Card>

  <Card title="Retrieve Groups" icon="layer-group" href="/sdk/react-native/retrieve-groups">
    Fetch group lists, search groups, and get group details
  </Card>

  <Card title="Leave a Group" icon="right-from-bracket" href="/sdk/react-native/leave-group">
    Leave groups and stop receiving updates
  </Card>

  <Card title="Transfer Ownership" icon="arrow-right-arrow-left" href="/sdk/react-native/transfer-group-ownership">
    Transfer group ownership before leaving
  </Card>
</CardGroup>
