Unlocked, managed and unmanaged package trade-offs
When to release metadata as an unlocked, org-dependent unlocked, second- or first-generation managed, or unmanaged package, and how Dev Hub ownership, beta versus released versions, push upgrades, refactoring and uninstall shape a package-based release.
Given a scenario, analyze and explain the use cases and considerations when using managed and unmanaged as well as unlocked packages.
~8 min read · 14 practice questions ·
What the exam expects
- Recommend unlocked, org-dependent unlocked, managed (2GP or 1GP) or unmanaged packaging from who installs the package and who may change it afterwards.
- Explain why unlocked packages need governance over production edits.
- Place the Dev Hub correctly, control who promotes a version to released, and keep beta versions out of pipeline sandboxes.
- Predict what push upgrades, refactoring between packages and uninstall do to components and data.
Key terms: unlocked package (a versioned container of metadata whose source of truth is version control and whose components stay editable), org-dependent unlocked package (an unlocked package validated against unpackaged metadata at install time), manageability rules (managed-package rules on who can edit or remove each component), beta version (a new package version before promotion), Dev Hub (the org that owns unlocked and 2GP packages).
Key facts
- Detail
- Editable; later versions can overwrite edits
- Detail
- At installation; can't depend on other packages
- Detail
- 75% Apex; none calculated for org-dependent
- Detail
- Needs the Dev Hub permission; once per version; can't undo
- Detail
- Expired hub: installed package can't be updated
- Detail
- Unlocked and 2GP: CLI and API; 1GP: API and UI
- Detail
- Only settings related to packaged metadata survive
- Detail
- Deletes package and deprecated components
Sources for this section (8)
- What's an Unlocked Package?developer.salesforce.com (opens in a new tab)
- Create Org-Dependent Unlocked Packagesdeveloper.salesforce.com (opens in a new tab)
- Code Coverage for Unlocked Packagesdeveloper.salesforce.com (opens in a new tab)
- Release an Unlocked Packagedeveloper.salesforce.com (opens in a new tab)
- Know Your Orgsdeveloper.salesforce.com (opens in a new tab)
- Push a Package Upgrade for Unlocked Packagesdeveloper.salesforce.com (opens in a new tab)
- Unlocked Packagesdeveloper.salesforce.com (opens in a new tab)
- Uninstall an Unlocked Packagedeveloper.salesforce.com (opens in a new tab)
- Why are immutable unlocked package versions useful in a CI/CD pipeline?
- When should a team develop an org-dependent unlocked package in a sandbox instead of scratch orgs?
- Which two 2GP capabilities support parallel branch development that 1GP lacks?
- When can a version that failed the coverage requirement still be installed?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Platform Development Lifecycle and Deployment Architect pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 26 lessons of the Platform Development Lifecycle and Deployment Architect guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Inline practice questions and one-click topic practice (14 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams