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

# How to delete a Devlab

> Delete a Devlab, its VM, and container disk.

If you no longer need a Devlab, delete it. Serverless AI automatically deletes its VM and container disk.

If the Devlab uses additional volumes, they aren't deleted with it. You can remove the mounted volumes manually. See the guides on [deleting a filesystem](https://docs.nebius.com/kubernetes/storage/filesystem-over-csi.md#how-to-delete-the-created-resources) and [deleting a bucket](https://docs.nebius.com/object-storage/buckets/manage.md#how-to-delete-buckets).

## Prerequisites

> [tab] Web console
>
> Make sure that you are in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
> role within your
> .
> You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] CLI
>
> * [Install and configure](https://docs.nebius.com/cli/install.md) the Nebius AI Cloud CLI.
>
>   Check that your project ID is saved in the Nebius AI Cloud CLI profile configuration:
>
>   ```bash theme={null}
>   cat ~/.nebius/config.yaml
>   ```
>
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] Go SDK
>
> * [Install and initialize the Nebius SDK for Go](https://docs.nebius.com/sdk/go/install-auth.md).
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] Python SDK
>
> * [Install and initialize the Nebius SDK for Python](https://docs.nebius.com/sdk/python/install-auth.md).
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

> [tab] JavaScript SDK
>
> * [Install and initialize the Nebius SDK for JavaScript](https://docs.nebius.com/sdk/javascript/install-auth.md).
> * Make sure that you or the service account that you use is in a [group](https://docs.nebius.com/iam/authorization/groups/index.md) that has the
>   role within your
>   .
>   You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

## Steps

> [tab] Web console
>
> 1. In the sidebar, go to  **Serverless AI** → **Devlabs**.
> 2. Find the Devlab and then click  → **Delete**.
> 3. In the window that opens, confirm the deletion.

> [tab] CLI
>
> 1. List Devlabs and copy the ID of the Devlab you want to delete:
>
>    ```bash theme={null}
>    nebius ai devlab list
>    ```
>
> 2. Delete the Devlab:
>
>    ```bash theme={null}
>    nebius ai devlab delete <devlab_ID>
>    ```

> [tab] Go SDK
>
> 1. List Devlabs:
>
>    ```go theme={null}
>    listDevlabService := sdk.Services().Ai().V1().Devlab()
>    listDevlabsRequest := &ai.ListDevlabsRequest{
>        ParentId: "<project_ID>",
>    }
>    for {
>        devlabs, err := listDevlabService.List(
>            ctx, listDevlabsRequest,
>        )
>        if err != nil {
>            return fmt.Errorf("list devlabs: %w", err)
>        }
>        fmt.Println(devlabs)
>        if devlabs.GetNextPageToken() == "" {
>            break
>        }
>        listDevlabsRequest.PageToken = devlabs.GetNextPageToken()
>    }
>    ```
>
>    In `ai.ListDevlabsRequest`, set `ParentId` to the [project ID](https://docs.nebius.com/iam/manage-projects.md#go-sdk-3). In the response, copy the `Metadata.Id` of the required Devlab.
>
> 2. Delete the Devlab:
>
>    ```go theme={null}
>    deleteDevlabService := sdk.Services().Ai().V1().Devlab()
>    deleteDevlabOperation, err := deleteDevlabService.Delete(
>        ctx,
>        &ai.DeleteDevlabRequest{Id: "<devlab_ID>"},
>    )
>    if err != nil {
>        return fmt.Errorf("delete devlab: %w", err)
>    }
>    if _, err = deleteDevlabOperation.Wait(ctx); err != nil {
>        return fmt.Errorf("wait for devlab delete: %w", err)
>    }
>    ```
>
>    In `ai.DeleteDevlabRequest`, set `Id` to the Devlab ID. The sample waits for deletion to complete.

> [tab] Python SDK
>
> 1. List Devlabs:
>
>    ```python theme={null}
>    list_devlab_service = DevlabServiceClient(sdk)
>    list_devlabs_request = ListDevlabsRequest(
>        parent_id="<project_ID>",
>    )
>    while True:
>        devlabs = await list_devlab_service.list(
>            list_devlabs_request,
>        )
>        print(devlabs)
>        if not devlabs.next_page_token:
>            break
>        list_devlabs_request.page_token = devlabs.next_page_token
>    ```
>
>    In `ListDevlabsRequest`, set `parent_id` to the [project ID](https://docs.nebius.com/iam/manage-projects.md#python-sdk-3). In the response, copy the `metadata.id` of the required Devlab.
>
> 2. Delete the Devlab:
>
>    ```python theme={null}
>    delete_devlab_service = DevlabServiceClient(sdk)
>    delete_devlab_operation = await delete_devlab_service.delete(
>        DeleteDevlabRequest(id="<devlab_ID>"),
>    )
>    await delete_devlab_operation.wait()
>    ```
>
>    In `DeleteDevlabRequest`, set `id` to the Devlab ID. The sample waits for deletion to complete.

> [tab] JavaScript SDK
>
> 1. List Devlabs:
>
>    ```ts theme={null}
>    const listDevlabService = new DevlabService(sdk);
>    const listDevlabsRequest = ListDevlabsRequest.create({
>      parentId: "<project_ID>",
>    });
>    while (true) {
>      const devlabs = await listDevlabService.list(
>        listDevlabsRequest,
>      );
>      console.log(devlabs);
>      if (!devlabs.nextPageToken) {
>        break;
>      }
>      listDevlabsRequest.pageToken = devlabs.nextPageToken;
>    }
>    ```
>
>    In `ListDevlabsRequest`, set `parentId` to the [project ID](https://docs.nebius.com/iam/manage-projects.md#javascript-sdk-3). In the response, copy the `metadata.id` of the required Devlab.
>
> 2. Delete the Devlab:
>
>    ```ts theme={null}
>    const deleteDevlabService = new DevlabService(sdk);
>    const deleteDevlabOperation = await deleteDevlabService.delete(
>      DeleteDevlabRequest.create({ id: "<devlab_ID>" }),
>    ).result;
>    await deleteDevlabOperation.wait();
>    ```
>
>    In `DeleteDevlabRequest`, set `id` to the Devlab ID. The sample waits for deletion to complete.
