Is there anything I can do to prevent another infection?
BMJ Group Medical Reference
There are things you can try yourself to avoid getting bacterial vaginosis, although there hasn't been much research on whether they work.
One self-help treatment is to put live yoghurt (containing Lactobacillus acidophilus) in your vagina. But there hasn't been any research to show this helps to clear bacterial vaginosis, or that this will stop you from getting it.
One study found that vaginal capsules containing 'friendly' bacteria helped keep bacteria levels normal after treatment with antibiotics.  The strain of bacteria used in the study was Lactobacillus casei rhamnosus (Lcr35).
You should avoid vaginal douching (where you force water or another liquid into your vagina to rinse it out). And don't use shower gels, antiseptic agents, or shampoo in the bath.
For references related to Bacterial vaginosis click here