How to delete duplicate product or put one of them inactive

How to delete duplicate product or put one of them inactive

My organization have 150000 products and we are looking for way in profesional edition to put one of duplicates inactive.

Alternativli how to mass delete products if product code is same.

I dont see criteria in mass delete option