Blog
Dec 08

How to Delete Products programmatically in Magento 2

When you need to remove a product from your Magento 2 store you can Delete products programmatically in Magento 2.

Step 1:

Create one file product_remove.php in the Magento root directory then add the below code.

 

Step 2:

After adding the above code run like

https://yourdomain/product_remove.php/

Conclusion

You can now remove/Delete Product programmatically in Magento 2 and keep your products catalog up-to-date.