> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moorcheh.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Namespace

> Delete a namespace and all of its items. Runs asynchronously; poll the delete job for progress.

## Overview

Removes a namespace and every item in it (documents, vectors, uploaded file chunks, summaries). Also clears that namespace from `file_registry.json`. The operation runs in the background. Use the returned `job_id` with [Delete job status](/on-prem/api-references/namespaces/delete-job-status).

When the delete job completes, global item quota is freed for all items that were in the namespace.

<Note>
  Files under `~/.moorcheh/uploads` are **not** deleted — only indexed data is removed.
</Note>

## Path parameters

<ParamField path="namespace_name" type="string" required>
  Name of the namespace to delete.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X DELETE "http://localhost:8080/namespaces/my-documents"
  ```
</RequestExample>

## Response fields

<ResponseField name="status" type="string">
  Request outcome. `"success"` when the delete job was started; `"failure"` on error.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable result or error description.
</ResponseField>

<ResponseField name="namespace_name" type="string">
  Name of the namespace being deleted. Present when the delete job was started.
</ResponseField>

<ResponseField name="job_id" type="string">
  Id of the async delete job. Poll [Delete job status](/on-prem/api-references/namespaces/delete-job-status) with this value. Present when the delete job was started.
</ResponseField>

<ResponseExample>
  ```json 202 - Accepted theme={null}
  {
    "status": "success",
    "message": "Namespace delete started. Poll delete job status for progress.",
    "namespace_name": "my-documents",
    "job_id": "job-682efd0be4484e49b7bf787466d6e9a4"
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "status": "failure",
    "message": "Namespace 'my-documents' not found."
  }
  ```
</ResponseExample>

## Next Steps

* [Delete job status](/on-prem/api-references/namespaces/delete-job-status) — poll until `status` is `completed` or `failed`
* [List namespaces](/on-prem/api-references/namespaces/list) — confirm the namespace was removed

## Related

* [CLI: moorcheh namespace-delete](/on-prem/cli/namespaces/delete)
* [Python: namespaces.delete()](/on-prem/python-client/namespaces/delete)
