Let's first say that you don't need to delete the products to update them — you just need to import a file with the latest information.
We recommend that you do not delete products that have already been indexed, but simply set them to the statuses Out of stock and Display: None. This will allow you not to lose the traffic that these pages brought.
If you still need to delete products, you can do it only manually in the admin panel. Please note that it is not possible to restore deleted products.
Step 1.
In the Products section of the admin panel, click the three dots icon in the upper right corner and change the number of displayed rows to 160 per page.
Step 2.
Check the boxes next to the products you want to delete, or check the top box to select all products on the page.
Step 3.
In the bulk actions panel below, click Other actions, then click Delete.
Step 4.
Confirm the deletion and wait for the operation to complete.