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

# Delete A Group

> Delete CometChat groups from Flutter apps by GUID when the logged-in user has admin permissions.

<Accordion title="AI Integration Quick Reference">
  | Field          | Value                                                                                                                                                                                   |
  | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Package        | `cometchat_sdk`                                                                                                                                                                         |
  | Import         | `import 'package:cometchat_sdk/cometchat_sdk.dart';`                                                                                                                                    |
  | Purpose        | Delete CometChat groups from Flutter apps by GUID when the logged-in user has admin permissions.                                                                                        |
  | Key methods    | `deleteGroup()`                                                                                                                                                                         |
  | Key classes    | `Group` · `CometChatException`                                                                                                                                                          |
  | Prerequisites  | SDK initialised via [`CometChat.init()`](/sdk/flutter/setup) and a logged-in user via [`CometChat.login()`](/sdk/flutter/authentication-overview).                                      |
  | Constraints    | `onSuccess` and `onError` are **both required** — omitting either is a compile error, and awaiting the call alone gives you nothing to act on. Put the success path inside `onSuccess`. |
  | Related        | [Create A Group](/sdk/flutter/create-group) · [Leave A Group](/sdk/flutter/leave-group)                                                                                                 |
  | Full reference | [`Group`](/sdk/reference/entities#group) · [`CometChatException`](/sdk/reference/auxiliary#cometchatexception)                                                                          |
</Accordion>

## Delete Group

To delete a group you need to use the `deleteGroup()` method. The user must be an **Admin** of the group they are trying to delete.

<Tabs>
  <Tab title="Dart">
    ```dart theme={null}
    String GUID = "GUID";

    CometChat.deleteGroup(GUID, onSuccess: (String message) {
    debugPrint("Deleted Group Successfully : $message ");
    }, onError: (CometChatException e) {
    debugPrint("Delete Group failed with exception: ${e.message}");
    });
    ```
  </Tab>
</Tabs>

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

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