What’s the main differences between unlocked & unmanaged packages?
Answer
As for me, the most important difference is that the unlocked package uses SFDX for development. So you, as a developer, could create a package, create a new version, promote, install to org within only SFDX. So it is possible to script all required actions, so that automate the process and use CI in the development of the package.
Unlocked Package
- 2-nd generation package
- requires enabled DevHub and Packaging feature on DevHub on an org
- uses SFDX and all its powerful instruments for development (like
sfdx force:source:push
sfdx force:source:pull
CLI commands) - source of truth is your version control system
- uses scratch orgs for development
- can have dependencies on other 2-nd gen packages
Unmanaged Package
- first-generation package
- commonly uses Metadata API to develop components of the package
- source of truth is a developer org
- you need to manually add components to a package, upload new version from dev org by means of UI
Attribution
Source : Link , Question Author : pincet , Answer Author : Oleksandr Berehovskyi