> ## Documentation Index
> Fetch the complete documentation index at: https://docs.42plugin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 更新插件

> 更新已安装的插件到最新版本

使用 `42plugin update` 命令更新已安装的插件。支持并行版本检查，快速完成更新。

## 更新当前项目插件

```bash theme={null}
42plugin update
```

## 更新全局插件

```bash theme={null}
42plugin update -g
```

## 更新所有项目的插件

```bash theme={null}
42plugin update -a
```

## 更新指定插件

```bash theme={null}
42plugin update 42ailab/sci/psych-review
```

## 检查可用更新

```bash theme={null}
42plugin update --check
```

仅检查哪些插件有可用更新，不实际更新。

## 自动确认

```bash theme={null}
42plugin update -a -y
```

跳过确认提示，适合脚本和自动化场景。

## 示例

```bash theme={null}
$ 42plugin update --check
检查更新中...

可用更新：
  42ailab/sci/psych-review    1.0.0 → 2.1.0
  42ailab/dev/code-review     1.2.0 → 1.3.0

运行 42plugin update 以更新所有插件
```

```bash theme={null}
$ 42plugin update
更新中...
  ✓ 42ailab/sci/psych-review    2.1.0
  ✓ 42ailab/dev/code-review     1.3.0

已更新 2 个插件
```

## 更新选项

| 选项             | 说明           |
| -------------- | ------------ |
| `-g, --global` | 更新全局安装的插件    |
| `-a, --all`    | 更新所有项目的插件    |
| `--check`      | 仅检查可用更新      |
| `-y, --yes`    | 自动确认，无需手动确认  |
| `--force`      | 强制更新（忽略版本检查） |

<Tip>
  建议定期运行 `42plugin update` 保持插件最新，获得最佳体验和安全修复。
</Tip>

## 下一步

<CardGroup cols={2}>
  <Card title="查看已安装" icon="list" href="/install/cli-list">
    查看当前安装的插件
  </Card>

  <Card title="卸载插件" icon="trash" href="/install/cli-uninstall">
    卸载不再需要的插件
  </Card>
</CardGroup>
