Develop Apps with Ease Using Second-Generation Managed Packages (Generally Available)

Second-generation managed packaging (2GP) ushers in a new way for AppExchange partners to develop, distribute, and manage their apps and metadata. You can use 2GP to organize your source, integrate with your version control system, and better utilize your custom Apex code. With version control being the source of truth, there are no packaging orgs, and you can execute all packaging operations via Salesforce CLI, enabling end-to-end automation. You can submit second-generation managed packages for security review and list them on AppExchange.

Where: This change applies to Lightning Experience and Salesforce Classic in all editions.

When: Second-generation managed packaging is generally available on October 12, 2019.

Who: Users need either the System Administrator profile or the Create and Update Second-Generation Packages permission.

Why: New in Winter ’20
  • Distribute second-generation managed packages on AppExchange
  • Create package patch versions
  • Create post install scripts
  • Get expanded metadata coverage


Use 2GP to create new managed packages. You can’t currently convert a first-generation package to a second-generation package.

How: To enable second-generation managed packages, first enable Dev Hub. From Setup, enter Dev Hub in the Quick Find box, and select Dev Hub. Then select Enable Dev Hub, and select Enable Unlocked Packages and Second-Generation Managed Packages.