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

# deleteEnvironment

> Deletes an environment with its warehouse connections and variables. The built-in `production` environment, the default of each type and a Bolt environment an agent environment defers to can't be deleted. Needs `environments:write`.



**mutation** `deleteEnvironment(input: DeleteEnvironmentInput!): DeleteEnvironmentPayload!`

## Arguments

**`input`**: `DeleteEnvironmentInput!` (required)

The environment to delete.

## Returns

`DeleteEnvironmentPayload!`

**`environment`**: `Environment!`

The deleted environment. Its slug is free to use again.

## Examples

```graphql Mutation
mutation DeleteEnvironment($input: DeleteEnvironmentInput!) {
  deleteEnvironment(input: $input) {
    environment {
      slug
      type
      name
      isDefault
      branch
      dbtVersion
    }
  }
}
```

```json Variables
{
  "input": {
    "slug": "string"
  }
}
```

```json Response
{
  "data": {
    "deleteEnvironment": {
      "environment": {
        "slug": "string",
        "type": "SCHEDULER",
        "name": "string",
        "isDefault": true,
        "branch": "string",
        "dbtVersion": "string"
      }
    }
  }
}
```


## Related topics

- [Administration API: Environments](https://docs.paradime.io/developers/graphql-api/admin-api/environments.md)
- [Admin client: environments](https://docs.paradime.io/developers/python-sdk/modules/admin/environments.md)
- [Admin CLI](https://docs.paradime.io/developers/paradime-cli/admin-cli.md)
- [Radar environment](https://docs.paradime.io/products/settings/connections/cost-connection/index.md)
- [Delete a connection](https://docs.paradime.io/guides/data-warehouse-essentials/manage-connections/delete-connections.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.