I added a custom product attribute to the default attribute set in Magento 2, but now when I try to remove it, by dragging the property to 'Unassigned Attributes' list, nothing happens. Its not clear how to remove a custom product attribute, once you added it to an attribute set.
I also tried this with a new custom product attribute set, added the custom attribute by dragging it to the Product Details group, saving the changes, and then trying to remove it again, but it does not seem to work.
I am using Magento 2.0.7.
Best Answer
You can remove it by adding the following code to the
app/code/MyVendor/MyModule/Setup/InstallData.php
file of your module (make sure to change themy_attribute
value).Hope it helps.
Purge cache and deploy static content by running the following commands.