Paritally Uninstallation of package

Hey community,

Need help in partially uninstall each package.

I have 2 products (let's say  X and Y ) ,each consists of 5 modules.

Out of 5 in X ,2 modules (let's say A and B ) are core which will required for Y.

C,D,E are related to X only.

My product will be uninstallable which will uninstall all 5 Modules, which I don't want as A and B can be Y as well.

I want to Uninstallation process don't uninstall A and B, as an instance can have my other products (Y) which need A and B.

Any clue to stop A and B if a user is going to uninstall X or Y.

Any Help will be highly appreciated.

Kind Regards,

Ashish Dwivedi  

Founder at Outright Store

Email: ashish@outrightcrm.com
Website:  https://store.outrightcrm.com/