Magento 2 Delete EAV Attributes | Emmo

  • Item Number (EMMO): magento-2-delete-eav-attributes
$79.99
plus shipping and handling
$79.99
Emmo
1
1
Add to Wishlist

Uninstall a module and the attribute is still in the catalog. Magento Admin will not drop it. Pass the attribute codes to one CLI command and Magento removes those EAV records. For developers and agencies cleaning up after a failed uninstall, a migration, or unused custom attributes.

One command, as many codes as you need

Run it from the Magento root. Codes are comma-separated. The CLI reports how many attributes were deleted. Empty input is rejected, so a blank delete does not run.

Learn more ›

When Admin Delete will not

A used custom attribute often has Delete greyed out, or the delete throws. This command is the cleanup after that, not a screen for browsing attributes.

Learn more ›

Magento’s own attribute delete

The command loads an EAV collection filtered to the codes you pass. Each match is removed through Magento’s attribute model, not a raw SQL wipe of the catalog.

Learn more ›

CLI only

SSH and bin/magento only. There is no Admin grid, and nothing on the storefront. Keep it out of day-to-day merchant work.

Learn more ›

What the command does

Filter by code Magento EAV collection, only the attribute_code values you pass.
Native delete Each match goes through Magento’s attribute model.
A count, or an error The CLI prints how many attributes were deleted, or an error if Magento cannot finish.
Empty input A blank --Attributes value is rejected. The delete does not run.

Use it when

  • A module uninstalled but left EAV attributes behind.
  • Admin Delete is greyed out or throws on a used custom attribute.
  • You are cleaning a staging or migrated catalog before go-live.
  • You already have the leftover codes from a ticket.

Do not use it when

  • System attributes: sku, name, price, status, visibility, tax_class_id.
  • You still need the values on live products or layered navigation.
  • You have no database backup.
  • You want an Admin grid to browse and edit attributes.

Back up first. This deletes EAV attribute records. The module has no undo. Take a database snapshot, run on staging, then production.

Confirm the codes twice

  1. 1Enable Emmo_DeleteMageAttributes and run setup:upgrade. Unzip the package as app/code/Emmo/DeleteMageAttributes.
  2. 2Database backup. Prefer a staging copy of production first.
  3. 3Confirm attribute_code values in Magento Admin or in eav_attribute.
  4. 4bin/magento emmo:delete --Attributes=code_one,code_two
  5. 5cache:flush, then confirm the attributes are gone from Stores → Attributes.

No Admin grid. No restore. No scanner that deletes every unused attribute. You pass the codes you already know should go. Magento Open Source and Adobe Commerce. PHP 8.1–8.4. CLI and SSH. Command: emmo:delete --Attributes=code1,code2. Support: [email protected]

More Information

More Information
Follow Meta Tag Index HTML page, follow links

Reviews

Write Your Own Review
Only registered users can write reviews. Please Sign in or create an account