Unlocked vs Managed Packages

162 Views

Unlocked Packages are more like an advanced form of Managed Packages, not Unmanaged Packages. Many of the same differences exist for Unlocked Packages and Managed Packages as compared to Unmanaged Packages.

Upgrade Components

Unlocked Packages can be upgraded, like Managed Packages. Unmanaged Packages cannot be upgraded without uninstalling.

Downgrade Components

Unlocked Packages can be downgraded. Managed Packages and Unmanaged Packages cannot be downgraded.

Dependencies

Unlocked Packages can have dependencies on other packages, both Managed Packages and Unlocked Packages. Managed Packages cannot have dependencies on Unlocked Packages.

Multiple Packages

Unlocked Packages can have multiple packages in a single org, unlike Managed Packages, which each require their own org.

Namespace Differences

Managed Packages support Namespaces. Unlocked Packages may only exist in a Managed Package namespace, or in a null namespace, like Unmanaged Packages.

Delete Components

Unlocked Packages can delete metadata that is obsolete, unlike Managed Packages (with limited exceptions). Unlocked Packages can optionally not delete metadata that is obsolete, unlike Unmanaged Packages.

Source of Truth

Unlocked Packages are always sourced from local files, while Unmanaged Packages and Managed Packages always source from an org.


As you can see, Unlocked Packages are more of a hybrid between Managed Packages and Unmanaged Packages, leaning towards the Managed Package end of the feature spectrum. They are far more convenient than Unmanaged Packages for almost all use cases, except the obvious one-off “share the package with the others” scenario, and often more convenient than Managed Packages for non-ISVs (though they also help ISVs).

For more details,

https://sfdc-db-gmail.github.io/unlocked-packages/faq-unlocked-pkgs.html
https://salesforce.stackexchange.com/questions/293491/unlocked-packages-vs-unmanaged-packages

Leave a Comment