Thanks for your question
Go to admin > System > configuration >[catalog] Inventory
find Display Out of Stock Products & set no
Thanks and have a nice day!
Answer for After setting "Stock Availability" as Out of stock still product showing in font end of magento.How to hide out of stock products programmatically?