There are some foods that contain bacteria-fighting properties. For example, essential oils and extracts from plants are often used as "natural remedies" to help fight or prevent certain infections.
Check out this video, which lists the top 20 bacteria-killing foods. Including some of these foods in your regular diet may help to boost your immune system and prevent you from getting sick.
Source: The Science of Eating