Another way to prevent infections is by avoiding unpasteurized, or raw, milk. This includes foods made from raw milk. Unpasteurized products can contain harmful bacteria.