Prevent Shopify from deleting products with stock

Hi all, is anyone aware of a way to make it so that Shopify does not delete a product if it has stock available?

For context, I help run a shop with over 15k products. With the changing market, we notice that only 20% of those products have ever sold, and we want to start paying attention to the fast-moving products, but more importantly, the ones we have in stock. We want to cull about 60% of the products, but we dont want to delete anything that is in stock.

There is also another issue we face that relates to this. We very regularly receive new price lists from our various suppliers and mass update products, and so, if a product is suddenly not on the current price list, it gets marked as discontinued and is deleted. This is also done en masse.

If this isn’t already a feature, then consider this a recommendation to the Shopify dev team. I’d say the best way to implement this is if the product has stock, it cannot be deleted unless the stock is reduced to zero.

Hi, I think you could use shopify flow to help you automatically delete

Shopify doesn’t currently stop products from being deleted based on stock, so the fix is in your workflow:

Don’t delete products → use Draft or Archived instead
Only delete items with 0 inventory (set this as a strict rule)
Use tools like Shopify Flow or Matrixify to automate this condition
Change supplier sync logic: missing product = mark discontinued, not delete

@BradleyDragon ,

Shopify does not have any built in rule like do not delete if stock exists. If something triggers a delete manual or via import it will just remove the product even if you still have inventory.

A much safer approach would be

If product is not in supplier list → mark it as inactive or discontinued
If it still has stock → keep it
Only delete when stock is actually zero

Honestly most stores with large catalogs avoid deleting products altogether. They just archive or unpublish them. That way you dont lose data, history or accidentally remove something you still own.

Removing 60% of products the easiest practical way is

  • Filter products with inventory = 0
  • Bulk delete only those

And for everything else

  • Archive it or remove from sales channels

That alone will solve 80% of your problem.

Hi @BradleyDragon Shopify has NO product “lock” feature or similar.
It is the merchants responsibility to put proper processes in place for the product life cycle.
And your describing a bug in your process.

You should be processing all products, checking for stock , shortlisting those eligible for deletion(tagging,archiving,special collection,etc), optionally having staff reviewing the deletion list, THEN start the deletion as a seperate process with some sort of logging, and a way to use that logging to recreate the products.
Keeping in mind even recreating a product doesn’t mean it’s connected to things like orders the way the original deleted product was.
There’s also backup apps like rewind etc.

If you need automations built more rigoursly or put in place then reach out to me for services (click profile pic on forums for options to connect)

Location location location,
These are the peer to peer forums not personal support
For actual merchant feature requests contact a shopify support advisor on the help site: https://help.shopify.com/ → click question mark button next to chat input (as of march 2026)
For DEVELOPER api requests use the developer forum https://community.shopify.dev/
Always LOOK around first for any signs of actual internal staff activity on any platform before hollering into the void, especially now adays as you’ll mostly get bot replies.

If you are deleting a product, make sure to add a redirect for its URL. Broken links are not good for SEO. Since product pages can get indexed by search engines, keeping them as “out of stock” can sometimes be a better option to maintain traffic; especially if the product may return or still gets visits.