I am to create a new version of a package whereby certain folders and code is to be removed. Should I uninstall the previous version of the package and then install? Or install over the existing package? How will the existing metadata be removed? When I install the new package, I still see the deleted metadata in my new package's component section.
1 Answer
If you want the removed metadata to be actually removed in the org, use the --upgradetype Delete
parameter. This will remove everything that is no longer in the package (but can fail if there are dependencies). The default Mixed mode will deprecate anything that can't be deleted. The DeprecateOnly mode preserves all code and marks them as deprecated.
Uninstalling and installing a new version may permanent data loss, just as using the --upgradetype Delete
parameter. Uninstalling can also fail if there are dependencies outside the package.
-
1