Magento 2 Delete EAV Attributes | Emmo

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

Emmo · Magento 2

Delete leftover Magento EAV attributes from the CLI

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

CLI only Comma-separated codes Magento EAV delete Open Source & Adobe Commerce

The command

One line. As many codes as you need.

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

bin/magento emmo:delete \ --Attributes=vendor_old_attr,legacy_option

Use it / leave it

A cleanup tool — not an attribute manager

Use it when

The attribute should be gone
  • 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 have a known list of leftover codes from a ticket

Do not use it when

The code is Magento’s, or still in play
  • 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. There is no undo in the module. Take a database snapshot, run on staging, then production.

How it works

Looks up the codes. Deletes what Magento finds.

Filter by attribute_code Magento EAV collection, only the codes you pass.
Native delete Each match is removed through Magento’s attribute model — not a raw SQL wipe of the catalog.
Clear result The CLI prints how many attributes were deleted, or an error if Magento cannot complete it.
No Admin UI SSH / Magento CLI only. Keep it off the storefront and out of merchant day-to-day.

Go live

Five steps. Confirm the codes twice.

1 Install Enable Emmo_DeleteMageAttributes and run setup:upgrade.
2 Snapshot Database backup. Prefer a staging copy of production first.
3 List codes Confirm attribute_code values in Magento Admin or eav_attribute.
4 Run the command bin/magento emmo:delete --Attributes=code_one,code_two
5 Flush & check cache:flush, then confirm the attributes are gone from Stores → Attributes.

What you get

Compatibility

Magento Open Source & Adobe Commerce PHP 8.1–8.4 Magento EAV CLI / SSH

Downloads

  • Module package — unzip as app/code/Emmo/DeleteMageAttributes, enable, run setup:upgrade
  • Command — emmo:delete --Attributes=code1,code2

Not included

No Admin grid. No restore. No mass “delete unused” scanner. You pass the codes you already know should go.

Clean leftover EAV attributes after an uninstall — from Magento CLI, with a backup in your pocket. 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