Remove custom attribute from attribute set programatically magento2
Please use the following code. Detailed explanation click here. http://www.pearlbells.co.uk/delete-attribute-options-magento-2/
$eavConfig = $object_Manager->get('\Magento\Eav\Model\Config');
$attribute = $eavConfig->getAttribute('catalog_product', 'color');
$id = $attribute->getAttributeId();
$options = $attribute->getSource()->getAllOptions();
foreach ($options as $option) {
echo 'Delete label : '.$option['label'].PHP_EOL;
$options['delete'][$option['value']] = true;
$options['value'][$option['value']] = true;
}
$eavSetup = $object_Manager->get('\Magento\Eav\Setup\EavSetup');
$eavSetup->addAttributeOption($options);