---
title: "alpacon agent upgrade"
description: "Upgrade a server’s Alpamon agent from the CLI. Check platform requirements, skip confirmation for scripts, and handle a refusal when user work is still active."
---

> Full documentation index: https://docs.alpacax.com/llms.txt

# alpacon agent upgrade

Upgrade the Alpamon agent on a server to the latest version.

## Usage

`alpacon agent upgrade SERVER [flags]`

## Key facts

- Confirmation is required unless you pass `--yes`.
- Active Websh or WebFTP sessions and running commands block the action unless you pass `--force`.
- Exit code `5` means the server has active user work.

## Flags

| Flag | Type | Description | Default |
| --- | --- | --- | --- |
| `--force` | `bool` | Override the busy guard even when the server has active user work | `false` |
| `-h, --help` | `bool` | help for upgrade | `false` |
| `-y, --yes` | `bool` | Skip confirmation prompt | `false` |
| `--output` | `string` | Output format: table or json | `table` |

## Examples

Upgrade the agent

```bash
alpacon agent upgrade my-server
```

Skip confirmation

```bash
alpacon agent upgrade my-server --yes
```

Proceed despite active work

```bash
alpacon agent upgrade my-server --force
```

Linux, macOS, and Windows are supported. Windows agents need Alpamon 2.4.0 or later; see [upgrading the agent](/use/servers/register/install/#upgrading-the-agent) for older versions.

## Exit codes

Exit code `5` means the server has active user work; pass `--force` to override it, or wait until the work finishes.

Source: https://docs.alpacax.com/reference/cli/agent/upgrade/
