The following actions can help prevent a vaginal yeast infection. Eat a balanced diet rich in fruits, vegetables, whole grains, and nonfat dairy products. Some women think that eating foods with lactobacillus organisms, such as yogurt or acidophilus milk, will help prevent yeast infections. So far there is no evidence for this connection.