How to delete a global attribute (via the database) on Magento 2

  1. Get the attribute code of the global attribute from the backend of Magento.
  2. Log into your database either via a database client or via SSH.
  3. Find attribute ID from the table eav_attribute using a select statement with your attribute code in it.
  4. Unlink the super attribute from all the products products on the site using the mySQL command below, where <id> is the attribute ID you from step number 3.
    DELETE FROM catalog_product_super_attribute
    WHERE attribute_id = <id>
  5. Celebrate!!

Leave a Reply