How can I bulk delete product variants in my store?

Hi,

My products do not have variants, they are just a single product with no options.

I think something happened during a recent spreadsheet “update” I ran, which has created variants for quite a lot of my products - I am not sure how this happened as I was adding extra images to those products that needed them, and my spreadsheet was correct. This correctness was confirmed by looking at an export first to see how to structure a spreadsheet to import multiple images per product.

Anyway, now I see that a lot of my products have a variant on the product editor page, which I don’t want - I like to keep things simple! Note that the products that I uploaded multiple images for do not have this newly created variant issue - they just have multiple images as expected! I am not sure the image upload is even related to this, but I have been running several spreadsheet uploads into the system, only changing one or two values for a lot of products each time, to keep things simple.

Back to the issue…

I can manually delete the variant in the admin on each product edit page, but for thousands (unknown number actually) of products that’s really not a good plan, so I wondered if there was a way to identify and delete all variants from any product that has one, in bulk? I need to keep the product, just remove the variant from the product.

I have run a product export to try and see how the data is presented in the spreadsheet, but I cannot see anything related to a variant that is not the main product row in the spreadsheet (I was thinking I might see a second row for the product to show the variant details, but nothing??).

So for example, I can edit a specific product in Shopify admin and it shows me a Variant editable area where I can add multiple variants etc, instead of the normal Inventory panel.

Unless I am missing it, I cannot see anything in the spreadsheet export that will tell me which products have this “sub variant” and which do not?

Can anyone help point me in the right direction please?

Cheers,

Rob

We’ll need to see the product export, or at least a sample of it, to be able to work out what the issue is. Can you add it to Google Sheets and paste a link?

Do you mean for me to include products with and without the “variants” issue to look for the “why” in the data?

I can find some products that fit both scenarios and export those…

Cheers,

Rob

Yep exactly

Hi,

Having exported a few sample products some with the variant element and some without, I see that the difference in the data is in the Option 1 Value column.

I think on a previous spreadsheet import, I copied the product title into the Option 1 Value column, thinking that would be a good idea. Is this what has caused the issue with the variant thing appearing in the admin now?

Data is here:

https://docs.google.com/spreadsheets/d/1eyOHusy1Umd-0NvWUS3QRH5qW9Cg3K4cTRUz93SqMds/edit?usp=sharing

If that is actually the issue, will blanking that column and uploading a spreadsheet with Handle, Title and a blank Option 1 Value column remove that option, and the variant issue?

Cheers,

Rob

Yes, I think that is the problem. I’d try it for one erroneous product to make sure it fixes it before you work through the whole worksheet.

Hi,

I have already uploaded a test CSV with a blank Option 1 Value column and run that in without an error but it didn’t fix the problem.

Checking the documentation further (https://help.shopify.com/en/manual/products/import-export/using-csv#product-csv-file-format), the column value needs to be “Default Value” if I want to remove the option, so I have run that in, and this has now fixed the issue!

Thanks for helping push this along :slightly_smiling_face:

Cheers,

Rob