This code simply allows you to delete Magento2 products based on Product SKU's. You can even delete a bunch of products using product SKU's.
- Switch to Magento root folder.
- Put the file in Magento root folder.
- a [Product_Export_CSV.php]Change/Add the Product SKU's in the file and run it to export all sku and product name to file001.csv.
- b [Product_Delete.php]Change/Add the Product SKU's in the file and run it.
Magento supported version - Tested on Magento 2.3.x