> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-agentbuddy-4.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 iOS SDK. Only group admins can perform this operation.

<Accordion title="AI Integration Quick Reference">
  ```swift theme={null}
  // Delete a group (owner only)
  CometChat.deleteGroup(GUID: "GUID", onSuccess: { response in }, onError: { error in })
  ```

  **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.

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

<Tabs>
  <Tab title="Swift">
    ```swift theme={null}
    let GUID = "GUID";

    CometChat.deleteGroup(GUID: GUID, onSuccess: { (response) in
        print("Group deleted successfully.")
    }) { (error) in
        print("Group delete failed with error: " + error!.errorDescription);
    }
    ```
  </Tab>

  <Tab title="Objective C">
    ```objc theme={null}
    NSString *guid = @"cometchat-guid-101";

    [CometChat deleteGroupWithGUID:guid onSuccess:^(NSString * response) {
        NSLog(@"Group deleted successfully.");
    } onError:^(CometChatException * error) {
        NSLog(@"Group deletion failed with error: %@",[error errorDescription]);
    }];
    ```
  </Tab>
</Tabs>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Update a Group" icon="pen-to-square" href="/sdk/ios/update-group">
    Update group name, icon, description, and metadata
  </Card>

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

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

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