Skip to main content

customer:delete

Delete customers by various filters or in bulk.

warning

Using the --all or --force options can result in the deletion of many or all customers. Use these options with caution, especially in production environments.

n98-magerun2.phar customer:delete [options]

Options:

OptionDescription
--id[=ID]Customer Id
--email[=EMAIL]Email
--firstname[=FIRSTNAME]Firstname
--lastname[=LASTNAME]Lastname
--website[=WEBSITE]Website
-f, --forceForce delete
-a, --allDelete all customers. Ignore all filters.
-r, --rangeDelete a range of customers by Id
--fuzzyFuzziness

Examples:

n98-magerun2.phar customer:delete --id 1                     # Will delete customer with Id 1
n98-magerun2.phar customer:delete --fuzzy --email=test # Will delete all customers with email like "%test%"
n98-magerun2.phar customer:delete --all # Will delete all customers
n98-magerun2.phar customer:delete --range # Will prompt for start and end Ids for batch deletion