Hi Swetha. I have opened a case on support 6 months ago to be able to remove components from package. I can remove apex class, fields etc... but i cannot remove the lightning web component. I used Visual Studio to delete it, but i have this error: Cannot delete managed object ERROR running force:source:delete: The delete operation failed in the org. Review the error messages below, delete any files locally if needed, and re-run the command if applicable. 10:39:20.637 sfdx force:source:delete --sourcepath c:\Users\serra\Desktop\InnerSource\loyaltyDev\force-app\main\default\lwc\manageLoyaltyCriteriaModal --noprompt ended with exit code 1
Select a component which you wish to delete, then click on delete button. This deletes the component provided that it is not referred in any lightning page. talktowendys (https://www.talktowendys.today/)
Lightning Web Component cannot be deleted from a managed package, it can only be upgraded. So, if you have to deprecate the component, you will have to revert your package to beta state, deprecate the component and then release a new version.
Hope this helps you. Please mark this answer as best so that others facing thensame issue will find this information useful.
If Component is using in Package then we can not delete a Component Or Component App from the Org because it is used in Package and It can have Some Value which can affect any other place. So We can't do this. If It is not used anywhere then We can delete this in a Simple way.
If you find your Solution then mark this as the best answer.
Please see the articles "Remove components from a Managed Package"(https://help.salesforce.com/articleView?id=000326278&language=en_US&type=1&mode=1 )
https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/packaging_managed_component_deletion.htm
same issue will find this information useful.
Thank you
Cannot delete managed object
ERROR running force:source:delete: The delete operation failed in the org. Review the error messages below, delete any files locally if needed, and re-run the command if applicable.
10:39:20.637 sfdx force:source:delete --sourcepath c:\Users\serra\Desktop\InnerSource\loyaltyDev\force-app\main\default\lwc\manageLoyaltyCriteriaModal --noprompt ended with exit code 1
Lightning Web Component cannot be deleted from a managed package, it can only be upgraded. So, if you have to deprecate the component, you will have to revert your package to beta state, deprecate the component and then release a new version.
Hope this helps you. Please mark this answer as best so that others facing thensame issue will find this information useful.
Thank you
If Component is using in Package then we can not delete a Component Or Component App from the Org because it is used in Package and It can have Some Value which can affect any other place.
So We can't do this.
If It is not used anywhere then We can delete this in a Simple way.
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi