One cannot prevent all types of epilepsy but can take precautions to prevent certain conditions which can cause epilepsy. One should ensure proper prenatal and perinatal care to prevent birth injuries, proper immunization to prevent infections like meningitis, regular and healthy life style with avoidance of smoking and excess alcohol, and proper treatment of hypertension and diabetes to prevent strokes.