# upgrade_command

> **Function** in `deepagents_code`

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

Return the shell command to upgrade `deepagents-code`.

Falls back to the documented uv command for display-only guidance.

## Signature

```python
upgrade_command(
    method: InstallMethod | None = None,
    *,
    include_prereleases: bool | None = None,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `method` | `InstallMethod \| None` | No | Install method override.  Auto-detected if `None`. (default: `None`) |
| `include_prereleases` | `bool \| None` | No | Whether to include alpha/beta/rc releases. When `None`, follows the installed version's channel. When `True`, returns the uv pre-release command regardless of `method`, since only uv can be steered onto the pre-release channel. (default: `None`) |

---

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