---
title: "Delete a pre-receive environment"
method: DELETE
path: "/admin/pre-receive-environments/{pre_receive_environment_id}"
tags: ["enterprise-admin"]
---

# Delete a pre-receive environment

`DELETE /admin/pre-receive-environments/{pre_receive_environment_id}`

If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response.

The possible error messages are:

*   _Cannot modify or delete the default environment_
*   _Cannot delete environment that has hooks_
*   _Cannot delete environment when download is in progress_

## Path parameters

- `pre_receive_environment_id` integer, required

## Response `204`

Response

## Other responses

- `422` — Client Errors

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-5.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-5/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-5/versions/50ae54440071/schema)
