Newer Version Available

This content describes an older version of this product. View Latest

Upgrade a Second-Generation Managed Package Version

A package upgrade occurs when you install a new package version into an org that has a previous version of that package installed.

When you perform a package upgrade, here’s what to expect for metadata changes.

  • Metadata introduced in the new version is installed as part of the upgrade.
  • Metadata modified in the new version is updated as part of the upgrade.
  • Metadata removed in the new version is either deprecated or deleted as part of the upgrade.

To upgrade a package, use the package install CLI command

1sf package install --package 04t... --target-org me@example.com

For more examples and details about this command, see package install in the Salesforce CLI Command Reference.

Beta packages aren’t upgradeable. To install a new beta package or released version, first uninstall the beta package.

To upgrade a package version, the new version must be a direct descendent of the package version installed in your org. See Specify a Package Ancestor in the Project File for a Second-Generation Managed Package for more information.