[Yandex Cloud documentation](../../../index.md) > [Yandex Cloud Stackland](../../index.md) > [Step-by-step guides](../index.md) > Databases > YTsaurus > Disabling YTsaurus

# Disabling YTsaurus

To disable the [YTsaurus component](../../concepts/components/ytsaurus.md), switch the `YTsaurusConfig` resource to `spec.enabled: false`.

{% note alert %}

When you disable the component, the controller deletes Helm releases and the `stackland-ytsaurus` namespace. All YTsaurus cluster resources, including PVCs and data stored in them, will be deleted together with the namespace. Once the component is disabled, you cannot recover this data.

Before disabling this component, make sure you no longer need the YTsaurus cluster data or save it to an external storage.

{% endnote %}

## Using the CLI {#cli}

1. Open the `YTsaurusConfig main` resource to edit it: `kubectl edit ytsaurusconfig main`. Install `spec.enabled: false`. You can leave the `spec.cluster` fields unchanged.

    Alternatively, apply a ready-to-use manifest:

    ```yaml
    apiVersion: stackland.yandex.cloud/v1alpha1
    kind: YTsaurusConfig
    metadata:
      name: main
    spec:
      enabled: false
    ```

    ```bash
    kubectl apply -f ytsaurusconfig-disable.yaml
    ```

1. Wait for the deletion to complete. You can check the current removal status in the `ComponentInstallation ytsaurus-main` resource:

    ```bash
    kubectl get componentinstallation ytsaurus-main -o jsonpath='{.status.phase}'
    ```

    During the deletion, the status remains `Uninstalling`. Once the deletion succeeds, the `ComponentInstallation ytsaurus-main` resource will be removed from the cluster.

1. Make sure the `stackland-ytsaurus` namespace has been deleted:

    ```bash
    kubectl get namespace stackland-ytsaurus
    ```

    The command should return the `NotFound` error.

## Re-enabling the component {#re-enable}

To redeploy your YTsaurus cluster, set `spec.enabled` back to `true`. Re-enabling the component provisions a new YTsaurus cluster with empty storage. No data from the previous cluster is restored. For more information, see [Enabling YTsaurus](enable.md).