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

# Delete A Group

> Delete groups using the CometChat React Native SDK — requires Admin scope on the group.

<Info>
  **Quick Reference** - Delete a group:

  ```javascript theme={null}
  await CometChat.deleteGroup("GUID");
  ```
</Info>

<Note>
  **Available via:** [SDK](/sdk/react-native/delete-group) | [REST API](/rest-api/delete-group)
</Note>

## Delete a 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="JavaScript">
    ```javascript theme={null}
    var GUID = "GUID";

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

  <Tab title="TypeScript">
    ```typescript theme={null}
    var 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>
</Tabs>

<Accordion title="Response">
  **On Success** — `deleteGroup()` returns a boolean:

  | Parameter  | Type    | Description                   | Sample Value |
  | ---------- | ------- | ----------------------------- | ------------ |
  | `response` | boolean | Indicates successful deletion | `true`       |
</Accordion>

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

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

## Best Practices

<AccordionGroup>
  <Accordion title="Confirm before deleting">
    Deleting a group is irreversible — all messages, members, and metadata are permanently removed. Always prompt the user for confirmation before calling `deleteGroup()`.
  </Accordion>

  <Accordion title="Only Admins can delete groups">
    The logged-in user must have Admin scope on the group. Verify the user's scope using `getGroup()` before attempting deletion to provide a better UX.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="deleteGroup fails with permission error">
    Verify the logged-in user is an Admin of the group. Owners and Moderators may not have delete permissions depending on your app configuration.
  </Accordion>

  <Accordion title="Group still appears after deletion">
    Ensure the `deleteGroup()` promise resolved successfully. If using cached data, refresh your group list after deletion to remove stale entries.
  </Accordion>
</AccordionGroup>

***

## 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>
