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

# moorcheh namespace-delete

> Delete a namespace and all its items (async).

## Overview

Starts an asynchronous delete of a namespace and all items in it. Prints a JSON response with a `job_id` — poll progress with [moorcheh namespace-delete-job-status](/on-prem/cli/namespaces/delete-job-status).

When the job completes, global item quota is freed for all removed items.

## Synopsis

```bash theme={null}
moorcheh namespace-delete --namespace-name NAME [--base-url URL]
```

## Options

| Flag               | Required | Description                     |
| ------------------ | -------- | ------------------------------- |
| `--namespace-name` | Yes      | Namespace to delete             |
| `--base-url`       | No       | Default `http://localhost:8080` |

## Examples

```bash theme={null}
moorcheh namespace-delete --namespace-name my-documents

moorcheh namespace-delete --namespace-name my-documents --base-url http://localhost:8081
```

## Output

Prints JSON from `DELETE /namespaces/{namespace_name}`:

<ResponseField name="status" type="string">
  `"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">
  Namespace being deleted.
</ResponseField>

<ResponseField name="job_id" type="string">
  Async delete job id — use with `namespace-delete-job-status`.
</ResponseField>

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

## Workflow

```bash theme={null}
moorcheh namespace-delete --namespace-name my-documents
moorcheh namespace-delete-job-status --namespace-name my-documents --job-id <job_id>
```

Repeat the job-status command until `status` is `completed` or `failed`.

## Exit codes

| Code | Meaning               |
| ---- | --------------------- |
| `0`  | Delete job started    |
| `1`  | API error (404, etc.) |

## Related

* [CLI: namespace-delete-job-status](/on-prem/cli/namespaces/delete-job-status)
* [API: Delete namespace](/on-prem/api-references/namespaces/delete)
* [Python: namespaces.delete()](/on-prem/python-client/namespaces/delete)
