Delete Components from Managed Packages

After you’ve released a managed package, you may decide to refactor the package and delete a component. It’s your responsibility to educate your customers about the potential impact from any components you delete. In the Release Notes for your upgraded package, list all custom components you’ve deleted and notify customers of any necessary actions.

To enable component deletion in your packaging org, log a case in the Partner Community.

To delete a component from a managed package:

  1. From Setup, enter Lightning Components in the Quick Find box.

  2. Select Lightning Components.

  3. Click Del for the component that you want to delete.

    Lightning Components in Setup

When you remove a Lightning web component from a package, the component remains in a subscriber’s org after they install the upgraded package. The administrator of the subscriber’s org can delete the component, if desired.

When you delete a Lightning web component with an isExposed value of true, we recommend a two stage process to ensure that the deleted component has no dependencies on the other items in the package.

Stage One: Remove references.

  1. Edit the Lightning web component that you want to delete to remove all references to other Lightning web components.
  2. Upload your new package version.
  3. Push the stage-one upgrade to your subscribers.

Stage Two: Delete your obsolete component.

  1. Delete the Lightning web component from the package.
  2. Optionally, delete other related components and classes.
  3. Upload your new package version.
  4. Push the stage-two upgrade to your subscribers.

See Also