# Update Docker cleanup settings

Source: https://next.coolify.io/docs/api/endpoints/servers/update-server-docker-cleanup

## PATCH /servers/{uuid}/docker-cleanup

Update Docker cleanup settings

Update Docker cleanup settings for a server owned by the authenticated team. Turning on `delete_unused_volumes` needs a token with the `deploy` permission.

**Authentication:** Bearer token (`bearerAuth`)

### Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| uuid | path | yes | string | Server UUID |

### Request body

`application/json`, required.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| docker_cleanup_frequency | string | no | Cron / human frequency expression. |
| docker_cleanup_threshold | integer | no |  |
| force_docker_cleanup | boolean | no |  |
| delete_unused_volumes | boolean | no |  |
| delete_unused_networks | boolean | no |  |
| disable_application_image_retention | boolean | no |  |

### Responses

#### 200

Updated Docker cleanup settings.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| docker_cleanup_frequency | string | no |  |
| docker_cleanup_threshold | integer | no |  |
| force_docker_cleanup | boolean | no |  |
| delete_unused_volumes | boolean | no |  |
| delete_unused_networks | boolean | no |  |
| disable_application_image_retention | boolean | no |  |

#### 400

Invalid token.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | no |  |

#### 401

Unauthenticated.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | no |  |

#### 403

Turning on `delete_unused_volumes` needs the deploy permission.

#### 404

Resource not found.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | no |  |

#### 422

Validation error.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | no |  |
| errors | object | no |  |
