---
schema_version: "1"
id: d37c22e004c615241608a4724d58904d8ac4ca434104ba3e76678e59e32057a8
title: package version update
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfclireference/guides/package/cli_reference_package_version_update.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_package_version_update.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 934fa84c2765c1cbd84568f3d7ccef37ffafc2c075c8f48530cae6d44e641de1
products:
  - Salesforce CLI Command Reference
  - salesforcedx
---
<!-- prettier-ignore-start -->

# package version update

Update a package version.

## Description for package version update

Specify a new value for each option you want to update.

To display details about a package version, run "sf package version display".

## Aliases for package version update

`force:package:version:update`

## Flags

| Flag Name (Long) | Flag Name (Short) | Description |
|------------------|-------------------|-------------|
| <code>&#8209;&#8209;api&#8209;version</code> | N/A | **Type:** Value<br><br>Override the api version used for api requests made by this command |
| <code>&#8209;&#8209;branch</code> | <code>&#8209;b</code> | **Type:** Value<br><br>New package version branch. |
| <code>&#8209;&#8209;flags&#8209;dir</code> | N/A | **Type:** Value<br><br>Import flag values from a directory. |
| <code>&#8209;&#8209;installation&#8209;key</code> | <code>&#8209;k</code> | **Type:** Value<br><br>New installation key for key-protected package (default: null) |
| <code>&#8209;&#8209;json</code> | N/A | **Type:** Boolean<br><br>Format output as json. |
| <code>&#8209;&#8209;package</code> | <code>&#8209;p</code> | **Type:** Value<br>**Required**<br><br>ID (starts with 04t) or alias of the package to update a version of. |
| <code>&#8209;&#8209;tag</code> | <code>&#8209;t</code> | **Type:** Value<br><br>New package version tag. |
| <code>&#8209;&#8209;target&#8209;dev&#8209;hub</code> | <code>&#8209;v</code> | **Type:** Value<br>**Required**<br><br>Username or alias of the Dev Hub org. Not required if the `target-dev-hub` configuration variable is already set. |
| <code>&#8209;&#8209;version&#8209;description</code> | <code>&#8209;e</code> | **Type:** Value<br><br>New package version description. |
| <code>&#8209;&#8209;version&#8209;name</code> | <code>&#8209;a</code> | **Type:** Value<br><br>New package version name. |

## Examples for package version update

Update the package version that has the specified alias (that contains spaces) with a new installation key "password123"; uses your default Dev Hub org:

```shell
sf package version update --package "Your Package Alias" --installation-key password123
```

Update the package version that has the specified ID with a new branch and tag; use the Dev Hub org with username devhub@example.com:

```shell
sf package version update --package 04t... --branch main --tag 'Release 1.0.7' --target-dev-hub devhub@example.com
```

Update the package version that has the specified ID with a new description:

```shell
sf package version update --package 04t... --version-description "New Package Version Description"
```
<!-- prettier-ignore-end -->
