> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/purge_project.md).

# purge\_project

`imerit_ango.sdk.SDK.`

## purge\_project(project\_id, confirm\_name)

Delete a project and purge its files from Ango Hub’s default storage. The API key must belong to an administrator of the project’s organization.

### Parameters

* **project\_id:** string
  * The unique identifier for the project. You can find the project ID in [the user interface](/sdk/sdk-documentation.md#project-ids) or retrieve it using the [`list_projects`](/sdk/sdk-documentation/project-level-sdk-functions/list_projects.md) function.
* **confirm\_name:** string
  * The project name, which must match to confirm the purge operation. A mismatched name returns an error without deleting the project.
  * Example: "My Image Annotation Project"

Returns:

* **output:** dict
  * A dictionary containing the result of the operation.
  * Including a `status` field indicating whether the request was successful and a `data` field containing the response payload with updated resources produced by the operation.

{% hint style="danger" %}
Purging marks the project and its related assets, tasks, issues, and histories as deleted and removes files under the project’s prefix in Ango Hub’s default storage. Files in customer-connected external storage are not deleted. You can also purge a project that has already been soft deleted.
{% endhint %}

{% hint style="warning" %}
Before purging a project, consider exporting important assets, annotations, and workflow data using the available export functions.
{% endhint %}

### Example

{% tabs %}
{% tab title="python" %}

```python
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')

ango_sdk = SDK(api_key)

sdk_response = ango_sdk.purge_project(
    project_id=project_id, 
    confirm_name="My Annotation Project"
)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl -X POST "https://imeritapi.ango.ai/v2/project/$PROJECT_ID/purge" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY" \
  -d '{"confirmName": "My Annotation Project"}'
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Output</summary>

```
{'data': {'message': 'Project successfully deleted'}, 'status': 'success'}
```

</details>

{% hint style="info" %}
**See also**

[delete\_project](/sdk/sdk-documentation/project-level-sdk-functions/delete_project.md), [create\_project](/sdk/sdk-documentation/project-level-sdk-functions/create_project.md), [list\_projects](/sdk/sdk-documentation/project-level-sdk-functions/list_projects.md)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/purge_project.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
