I am trying to confirm if I can delete a Platform Event after I've released it in a managed package.

There is documentation which should outline this:

But the terminology isn't clear.

There isn't an entry for Platform Event.

But there rows for:

  • Lightning Event
  • Platform Event Channel
  • Platform Event Channel Member

Please could someone at Salesforce clarify if any of the above relate to the Platform Event object?

Specifically, I'd like to know if I can edit or delete Platform Events once the Managed Package has been released.

  • 3
    AFAIK you currently cannot remove/delete any components from a 2GP, which a platform event is. So I do not think you can delete it. You have the option of creating a separate version branch in your version structure, branching off from before the introduction of the platform event. Of course, you cannot then upgrade an existing install of the version that does include the platform event.
    – Phil W
    Commented Nov 22, 2020 at 12:10
  • 1
    Phil's right - 2GP does not yet have managed component deletion, full stop
    – David Reed
    Commented Nov 22, 2020 at 17:37
  • Thanks gents. And out of interest, which of the metadata items listed are Platform Events or are they not even listed?
    – Robs
    Commented Nov 22, 2020 at 18:00

1 Answer 1


Summarizing comments:

Second-generation packaging currently does not allow deletion of managed components of any type. It's on the list at Gaps Between First-Generation and Second-Generation Managed Packaging:

Components can’t be deleted from packages.

While the page states

We’re working to address these feature gaps.

I'm not aware of an accepted Idea or public road-map for that feature.

Platform Events are technically CustomObject in the Metadata API:

Deploy and retrieve platform event definitions from your sandbox and production org as part of your app’s development life cycle.

The CustomObject metadata type represents a platform event.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .