Scenario 1: You want to prevent your customers from buying a sold-out variant (color, size etc)
Answer: You can disable sold-out variants from being selected by your customers, or remove them from a product page by editing your theme's HTML/CSS. You do not need any app for that. See this link below for instructions:
Scenario 2: You want to hide sold-out products to clear out old inventory or for SEO reasons
Answer: There's an app for that!
FREE! Hide sold-out products for free.
FREE! Un-Hide when products are back in stock.
FREE! Delete sold-out products
Pay only to perform Hide, Un-Hide & Delete "Automatically" every day