# cleanup_update_logs

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/update_check/cleanup_update_logs)

Remove old update logs while preserving the newest recent logs.

## Signature

```python
cleanup_update_logs(
    *,
    retention_days: int = UPDATE_LOG_RETENTION_DAYS,
    max_files: int = UPDATE_LOG_MAX_FILES,
) -> None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `retention_days` | `int` | No | Maximum age in days to keep. (default: `UPDATE_LOG_RETENTION_DAYS`) |
| `max_files` | `int` | No | Maximum number of newest log files to keep. (default: `UPDATE_LOG_MAX_FILES`) |

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/3812967c84d90619848f3185f22470204fc88bd8/libs/code/deepagents_code/update_check.py#L1989)