---
title: dots.v2.functions.namespaces.byNamespace_id().delete()
description: Delete Namespace
product: Reference
url: https://docs.digitalocean.com/reference/dots/reference/functions/functions-delete-namespace/
last_updated: "2026-11-18"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# dots.v2.functions.namespaces.byNamespace_id().delete()

Generated on 18 Nov 2026 from DoTs version [`v1.25.0`](https://github.com/digitalocean/dots/releases/tag/v1.25.0)

## Usage

```typescript
client.v2.functions.namespaces.byNamespace_id(namespace_id).delete(requestConfiguration?: RequestConfiguration<object>): Promise<void>
```

## Description

Deletes the given namespace. When a namespace is deleted all assets, in the namespace are deleted, this includes packages, functions and triggers. Deleting a namespace is a destructive operation and assets in the namespace are not recoverable after deletion. Some metadata is retained, such as activations, or soft deleted for reporting purposes. To delete namespace, send a DELETE request to [`/v2/functions/namespaces/{namespace_id}`](https://docs.digitalocean.com/reference/api/reference/functions/index.html.md#functions_delete_namespace). A successful deletion returns a 204 response.

## Parameters

`namespace_id` string required

Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`

The ID of the namespace to be managed.

## Request Sample

## Show Request Sample

```typescript
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

await client.v2.functions.namespaces
    .byNamespace_id("fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").delete();
```

## More Information

See [`/v2/functions/namespaces/{namespace_id}`](https://docs.digitalocean.com/reference/api/reference/functions/index.html.md#functions_delete_namespace) in the API reference for additional detail on responses, headers, parameters, and more.