Deleting an environment
Written by
Updated at September 9, 2026
You can delete an environment if you no longer need it.
Management console
gRPC API
- In the management console
, select the folder where you want to delete an environment. - Navigate
to Managed Service for Apache Spark™. - In the left-hand panel, select
Environments. - Click
next to the environment and select Delete. - In the window that opens, confirm the deletion and click Delete.
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the EnvironmentService/Delete method to delete the environment:
grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/spark/v1/environment/environment_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "environment_id": "<environment_ID>" }' \ spark.api.cloud.yandex.net:443 \ yandex.cloud.spark.v1.environment.EnvironmentService.DeleteTo get your environment ID, call the EnvironmentService/List method.
-
Check the server response to make sure your request was successful.