Hiding out-of-stock products
The best way to hide out-of-stock products is to create a automated collection containing these products, which is then protected with Locksmith.
For more automation options around out-of-stock products, see Mechanic's "out of stock" task library.
1. Create an "out-of-stock" collection
In the "Collections" area of the Shopify admin, create a new collection. Under "Collection type", select the "Automated" option, and configure its conditions such that products match an inventory stock level of less than 1. Save the collection. The result: a collection that only contains products that have been sold out.
2. Lock the collection
Open up Locksmith, and use the "New lock" form on its homepage to search for your new collection, using the collection title that you specified earlier.
Click on the matching collection, and follow the steps to save its new lock.
On the next screen, update the lock's settings so that "Hide this collection and its products" is enabled.
Save your settings. You're done! The result: this collection, and its products (representing all out-of-stock products in your store) are now fully hidden from visitors.