Unmanaged, managed and unlocked packages
When to use an unmanaged, managed (1GP or 2GP), unlocked or org-dependent unlocked package, and what happens to profiles, permission sets, customizations and data when a package is installed, upgraded or uninstalled.
Describe the use cases and considerations when using unmanaged and managed packages.
~7 min read · 10 practice questions ·
What the exam expects
- Choose unmanaged, managed, unlocked or org-dependent unlocked packaging from who receives the app and whether it needs upgrades.
- Explain why packages are not the tool for moving your own sandbox changes to production.
- Contrast managed 1GP and 2GP: source of truth, namespaces, CLI automation, versioning.
- Predict what an upgrade does to profile settings and packaged permission sets.
- Predict what an uninstall removes, what blocks it, and how Apex tests behave at install.
Key terms: unmanaged package (a one-time, editable copy of components); managed package (provider-controlled, namespaced and upgradeable); unlocked package (a source-driven container for your own metadata); org-dependent unlocked package (an unlocked package validated against the installation org's metadata); namespace (the prefix on a managed package's uniquely named components).
Key facts
- Detail
- Editable; the publisher can't change or upgrade them
- Detail
- Don't use unmanaged packages; use VS Code extensions or change sets
- Detail
- Supported for managed packages only
- Detail
- Multiple packages can share one; 1GP is one package per namespace
- Detail
- All packaging operations via Salesforce CLI
- Detail
- Unlocked packages are especially suited
- Detail
- At installation, not version creation
- Detail
- Not upgraded; update manually
- Detail
- Not editable; clone or create your own
- Detail
- Package tests and all org tests run; can install despite failures
- Detail
- Emailed link; file deleted two days after uninstall
Sources for this section (7)
- Unmanaged Packagesdeveloper.salesforce.com (opens in a new tab)
- Upgrade Your Managed Packagehelp.salesforce.com (opens in a new tab)
- 1GP vs 2GPdeveloper.salesforce.com (opens in a new tab)
- Unlocked Packagesdeveloper.salesforce.com (opens in a new tab)
- Org-Dependent Unlockeddeveloper.salesforce.com (opens in a new tab)
- Install a Managed Packagehelp.salesforce.com (opens in a new tab)
- Uninstall a Managed Packagehelp.salesforce.com (opens in a new tab)
- Why can't you edit a permission set that arrives in a managed package, and what can you do instead?
- When you uninstall an unlocked package, what happens to deprecated components it once held?
- Why does an installer's API access stay in the admin's hands after an upgrade?
- What is the source of truth for a first-generation managed package?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Platform App Builder pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 26 lessons of the Platform App Builder guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Inline practice questions and one-click topic practice (10 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams