Well like with many dental issues how to prevent them is by having good oral hygiene habits. And see your dentist regularly as often as advised.  By doing this you not only help to prevent dental abscessed but you do help to maintain over all wellness of your oral health