---
title: "DeleteEnvironment"
method: POST
path: "/gitpod.v1.EnvironmentService/DeleteEnvironment"
tags: ["gitpod.v1.EnvironmentService"]
---

# DeleteEnvironment

`POST /gitpod.v1.EnvironmentService/DeleteEnvironment`

Permanently deletes an environment.

 Running environments are automatically stopped before deletion. If force
 is true, the environment is deleted immediately without graceful shutdown.

 ### Examples

 - Delete with graceful shutdown:

   Deletes an environment after gracefully stopping it.

   ```yaml
   environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
   force: false
   ```

 - Force delete:

   Immediately deletes an environment without waiting for graceful shutdown.

   ```yaml
   environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
   force: true
   ```

## Request body

- GitpodV1DeleteEnvironmentRequest
  - `environmentId` string, uuid — environment_id specifies the environment that is going to delete. +required
  - `force` boolean — force indicates whether the environment should be deleted forcefully When force deleting an Environment, the Environment is removed immediately and environment lifecycle is not respected. Force deleting can result in data loss on the environment.

## Response `200`

Success

- GitpodV1DeleteEnvironmentResponse

## Other responses

- `default` — Error

---

[API](https://skmtc.net/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.net/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/44d50c2ac284/schema)
