2019-03-10 14:02:15 +00:00
|
|
|
# choco upgrade
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
> 使用 Chocolatey 升级一个或多个包。
|
2021-10-01 19:28:01 +01:00
|
|
|
> 更多信息:<https://chocolatey.org/docs/commands-upgrade>.
|
2019-03-10 14:02:15 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 升级一个或多个用空格分隔的软件包:
|
2019-03-10 14:02:15 +00:00
|
|
|
|
2019-10-20 03:34:33 +01:00
|
|
|
`choco upgrade {{包名 包名 ..}}`
|
2019-03-10 14:02:15 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 将一个包升级到指定版本:
|
2019-03-10 14:02:15 +00:00
|
|
|
|
|
|
|
`choco upgrade {{包名}} --version {{版本号}}`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 升级全部包:
|
2019-03-10 14:02:15 +00:00
|
|
|
|
|
|
|
`choco upgrade all`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 升级除指定的用逗号分隔的包之外的所有包:
|
2019-03-10 14:02:15 +00:00
|
|
|
|
2019-10-20 03:34:33 +01:00
|
|
|
`choco upgrade all --except "{{包名 , 包名 ..}}"`
|
2019-03-10 14:02:15 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 自动确认所有提示:
|
2019-03-10 14:02:15 +00:00
|
|
|
|
|
|
|
`choco upgrade {{包名}} --yes`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 从自定义源处升级包:
|
2019-03-10 14:02:15 +00:00
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
`choco upgrade {{包名}} --source {{源 URL|别名}}`
|
2019-03-10 14:02:15 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 提供一个用户名和密码来进行验证:
|
2019-03-10 14:02:15 +00:00
|
|
|
|
2020-02-05 11:38:43 +00:00
|
|
|
`choco upgrade {{包}} --user {{用户名}} --password {{密码}}`
|