For guidance and examples, see [Manage namespaces](/guides/manage-data-manage-namespaces).

**Note:** This operation is not supported for pod-based indexes.

```python Python theme={null}
# Not supported with pinecone["grpc"] extras installed
from pinecone import Pinecone

pc = Pinecone(api_key="YOUR_API_KEY")

index = pc.Index(host="INDEX_HOST")

index.delete_namespace(namespace="example-namespace")
```

```javascript JavaScript theme={null}
import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' })

const index = pc.index('docs-example');

const namespace = await index.deleteNamespace('example-namespace');

console.log(namespace);
```

```java Java theme={null}
import io.pinecone.clients.Index;
import io.pinecone.configs.PineconeConfig;
import io.pinecone.configs.PineconeConnection;

import java.util.concurrent.ExecutionException;

public class DeleteNamespace {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        PineconeConfig config = new PineconeConfig("YOUR_API_KEY");
        // To get the unique host for an index, 
        // see https://docs.pinecone.io/guides/manage-data/target-an-index
        config.setHost("INDEX_HOST");
        PineconeConnection connection = new PineconeConnection(config);

        Index index = new Index(config, connection, "docs-example");

        index.deleteNamespace("example-namespace");
    }
}
```

```go Go theme={null}
package main

import (
    "context"
    "encoding/json"
    "fmt"
    "log"

    "github.com/pinecone-io/go-pinecone/v4/pinecone"
)

func prettifyStruct(obj interface{}) string {
  	bytes, _ := json.MarshalIndent(obj, "", "  ")
    return string(bytes)
}

func main() {
    ctx := context.Background()

    pc, err := pinecone.NewClient(pinecone.NewClientParams{
        ApiKey: "YOUR_API_KEY",
    })
    if err != nil {
        log.Fatalf("Failed to create Client: %v", err)
    }

    // To get the unique host for an index, 
    // see https://docs.pinecone.io/guides/manage-data/target-an-index
    idxConnection, err := pc.Index(pinecone.NewIndexConnParams{Host: "INDEX_HOST"})
    if err != nil {
        log.Fatalf("Failed to create IndexConnection for Host: %v", err)
    } 

    err := idxConnection.DeleteNamespace(ctx, "example-namespace")
    if err != nil {
        log.Fatalf("Failed to delete namespace: %v", err)
    }
}
```

```csharp C# theme={null}
using Pinecone;

var pinecone = new PineconeClient("PINECONE_API_KEY");

// To get the unique host for an index, 
// see https://docs.pinecone.io/guides/manage-data/target-an-index
var index = pinecone.Index(host: "INDEX_HOST");

await index.DeleteNamespaceAsync("example-namespace");
```

```bash curl theme={null}
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="YOUR_INDEX_HOST"
NAMESPACE="YOUR_NAMESPACE" # To target the default namespace, use "__default__".

curl -X DELETE "https://$INDEX_HOST/namespaces/$NAMESPACE" \
    -H "Api-Key: $PINECONE_API_KEY" \
    -H "X-Pinecone-Api-Version: 2025-04"
```

`DELETE /namespaces/{namespace}`

:::code-group
```bash title="cURL"
curl --request DELETE \
  --url https://{index_host}/namespaces/{namespace} \
  --header 'Authorization: Bearer <token>'
```

```json title="200"
{}
```
:::

## Authorizations

- `Authorization` (header, string, required) — Bearer authentication header of the form `Bearer <token>`.

## Path Parameters

- `namespace` (path, string, required) — The namespace to delete

## Response

- `200` — A successful response
- `400` — Bad request. The request body included invalid request parameters.
- `4XX` — An unexpected error response.
- `5XX` — An unexpected error response.

## Related pages

- [List namespaces](./database-2026-07-data-plane-listnamespaces.md)
- [Create a namespace](./database-2026-07-data-plane-createnamespace.md)
- [Describe a namespace](./database-2026-07-data-plane-describenamespace.md)
- [Delete a namespace](./database-2026-07-data-plane-deletenamespace.md)
- [List namespaces](./database-2026-04-data-plane-listnamespaces.md)
- [Create a namespace](./database-2026-04-data-plane-createnamespace.md)
- [Describe a namespace](./database-2026-04-data-plane-describenamespace.md)
- [Delete a namespace](./database-2026-04-data-plane-deletenamespace.md)
- [List namespaces](./database-2025-10-data-plane-listnamespaces.md)
- [Create a namespace](./database-2025-10-data-plane-createnamespace.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
