# Delete Community

The SDK provides a way for creators or moderators to delete a community by calling the `deleteCommunity` method. In the JavaScript SDK, this method is referred to as the `closeCommunity` method.

To delete a community using this method, users can call the method and provide the `communityId` as a parameter. This will trigger the deletion process, which will remove the community and associated community data.

It is important to note that deleting a community is a permanent action and cannot be undone. As such, it is recommended that users exercise caution when deciding to delete a community and ensure that they have taken all necessary precautions to preserve any important content or data associated with the community.

{% tabs %}
{% tab title="iOS" %}
{% embed url="<https://gist.github.com/amythee/36d5b032730280afd3825baceeb81424#file-delete-a-community-swift>" %}
{% endtab %}

{% tab title="Android" %}
{% embed url="<https://gist.github.com/amythee/f9daa8dbf555dd5504cbc405919a1760#file-amitycommunitydeletion-kt>" %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const success = await CommunityRepository.closeCommunity('abc');
```

{% endtab %}

{% tab title="TypeScript" %}
{% embed url="<https://gist.github.com/amythee/5895234d21c6120dea2a3ed551b4b896#file-deletecommunity-ts>" %}
{% endtab %}

{% tab title="Flutter" %}
{% embed url="<https://gist.github.com/amythee/74fd1344f6fef795471da6b099f0405c#file-amitycommunitydelete-dart>" %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.social.plus/social-plus-sdk/social/communities/delete-community.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
