# Delete Repository

Once you have created a repository using the [<mark style="color:blue;">**Docker URIs**</mark>](https://distribution.github.io/distribution/spec/api/#overview) and completed your operations, you may want to delete it. As the [<mark style="color:blue;">**Docker Registry V2 API**</mark>](https://docs.docker.com/reference/api/registry/latest/) does not support deleting entire repositories, you must use the **IONOS Cloud Container Registry API**. To perform this operation, you need:

* The `repository_name` you wish to delete. For more information about retrieving a list of repositories, see [<mark style="color:blue;">Retrieve all Repositories</mark>](https://api.ionos.com/docs/containerregistry/v1/#tag/Repositories/operation/registriesRepositoriesGet).
* The `registryId`, which can be obtained through the [<mark style="color:blue;">GET Registries</mark>](https://docs.ionos.com/sections-test/guides/containers/private-container-registry/api-howtos/registries) API call.

## Request

Run the following `curl` command to delete the repository:

{% hint style="info" %}
**Note:**

* In the following code, the sample `registryId` is `8fb592e4-494c-11ed-b878-0242ac120002` and `repository_name` is `dev/tests`.
* The repository name in the API URL must be URL-encoded. For example, `dev/tests` should be written as `dev%2Ftests` to prevent the slash from being interpreted as a path separator and causing a 404 error.
  {% endhint %}

```bash
curl --location \
--header 'Authorization: Bearer ${TOKEN}' \
--request DELETE 'https://api.ionos.com/containerregistries/registries/8fb592e4-494c-11ed-b878-0242ac120002/repositories/dev%2Ftests'
```

### Path parameters

| **Field**         | **Type** | **Description**                                                | **Example**                            |
| ----------------- | -------- | -------------------------------------------------------------- | -------------------------------------- |
| `registryId`      | string   | The ID of the registry to be returned. This is required.       | `8fb592e4-494c-11ed-b878-0242ac120002` |
| `repository_name` | string   | The name of the registry. It must be unique within the folder. | `dev%2Ftests`                          |

## Response

Upon success, the server returns **204 - No Content** to indicate the request was fulfilled without a response body.
