Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

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.