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

# Delete A Group

> Delete CometChat groups from JavaScript apps by GUID when the logged-in user has permission.

## 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="Update a Group" icon="pen-to-square" href="/sdk/javascript/update-group">
    Update group name, icon, description, and metadata
  </Card>

  <Card title="Leave a Group" icon="right-from-bracket" href="/sdk/javascript/leave-group">
    Leave a group you are a member of
  </Card>

  <Card title="Create a Group" icon="plus" href="/sdk/javascript/create-group">
    Create public, private, or password-protected groups
  </Card>

  <Card title="Groups Overview" icon="users" href="/sdk/javascript/groups-overview">
    Overview of all group management features
  </Card>
</CardGroup>
