cancel
Showing results for 
Search instead for 
Did you mean: 

Delete all products of Magento2

Delete all products of Magento2

Hi,

 

i try some things with a test magento2 setup .

 

Sometimes I try to add things with the import function. When something goes wrong, how can I delete all products cleanly?

 

thank you

2 REPLIES 2

Re: Delete all products of Magento2

Hi, @tabstop, I suppose the fastest way to delete all products on test environment is a MySQL query:

delete from catalog_product_entity;

Alternatively, if you would like to trigger all PHP code processing the delete product action, you can use Delete massaction in Admin Panel on the Catalog -> Products page.

Re: Delete all products of Magento2

Just execute following SQL query:

DELETE FROM catalog_product_entity;

Because of foreign key references between all product related tables, delete would cascade through them and perform a delete.

If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue