How do I deprecate a custom field from a managed package? This package is being created by us, we wanted a field which was packaged by mistake to be deprecated or deleted from the Package. How can we do that?
As @Lex said, you need to raise a Partner Community case to enable Component Deletion in your packaging organization. Once that is done, you can just simply remove the field from your packaging org. Whenever you package next (ie: the next version), the custom field will be removed. There are a couple of things to bear in mind:
- If someone had a previous version of your package (with the custom field) and upgrades to a new one, the field will remain as unmanaged in their org
- You will never be able to recreate the custom field on the same object with the same name again
A pragmatic - rather than ideal - approach is to change the label of the field; our convention is to add "(Deprecated)". So if the manual deployment instructions have not been followed to remove a field from a layout, this "(Deprecated)" acts as a visual indication for the customer that something is wrong.
(We adopted this convention before there was a mechanism to remove fields.)