Updated

They say you are what you eat, so it makes sense that eating healthy foods can help you stay, er, healthy.

"You can't underestimate the importance of good nutrition when it comes to...your immune system," says Karen Ansel, RD, a spokesperson for the Academy of Nutrition and Dietetics. "Vitamins, minerals, antioxidants — these are what keep your body strong, and without them you're not giving your body the edge it needs to ward off infection."

And we're not talking just fruits and vegetables: Foods from every food group are represented here. Make them a part of your diet for your best defense against colds and flu.

Fish

Oily fish—including salmon, tuna, and mackerel — are rich in omega-3 fatty acids, compounds that help reduce harmful inflammation in the body. Chronic inflammation prevents your immune system from working properly, and can contribute to colds and flu as well as more serious diseases.

Omega 3s may fight colds on more than one front. In a placebo-controlled 2011 study published in Brain, Behavior and Immunity, medical students who took fish oil supplements for three months had lower inflammation levels and also fewer symptoms of anxiety — a condition that can itself weaken immune function.

Oysters

Zinc, an essential mineral, has a strong track record of fighting the common cold. A comprehensive review of the research, published in a Canadian medical journal in 2012, concluded that taking zinc lozenges appears to shorten the duration of cold symptoms in adults.

Zinc supplements carry a risk of side effects such as nausea and headaches, however. A better bet, says Ansel, may be to get zinc straight from your diet. Oysters contain more of the nutrient per serving than any other food — but if you're concerned about staying healthy, you might not want to eat them raw. "Uncooked shellfish could contain harmful bacteria that could make you sick in other ways," Ansel says.

Garlic

These pungent cloves do more than just flavor your food. Garlic also contains allicin, a sulfuric compound that produces potent antioxidants when it decomposes.

A 2001 study in the journal Advances in Therapy found that people who took garlic supplements for 12 weeks between November and February got fewer colds than those who took a placebo. And of those who did get sick, those who took the garlic supplement felt better faster.

Garlic packs the biggest antioxidant punch when eaten raw. Flavor too strong for you? Consider taking aged-garlic extract capsules.

Anise seeds

These licorice-flavored seeds, which have antibacterial properties, have been shown to ease coughing and help clear congestion from the upper respiratory tract.

Anise seeds can be eaten (in rolls and cookies, for instance), but for cold-fighting the delivery method of choice is usually tea. According to the American Pharmaceutical Association's Practical Guide to Natural Medicines, a typical recipe is to add one cup of crushed anise seeds to one cup of hot water, and flavor with sugar, garlic, cinnamon, or honey (if desired). Sip this concoction up to three times a day.

Citrus fruits

Recent research suggests that vitamin C may not be as useful in preventing colds as once thought. However, studies do show that taking the vitamin at the first sign of illness may reduce a cold's duration by about a day, which can feel like a lifetime when you're suffering.

Eating lots of citrus — whether that entails digging in to orange and grapefruit slices, or using lemons and limes in recipes — will provide plenty of this powerhouse nutrient. Don't worry about overdoing it, since it's very hard to overdose on vitamin C. Anything your body doesn't use is just washed right out of your system.

Fennel

Like anise seeds, fennel is a natural expectorant, and can help clear chest congestion and soothe a persistent cough. The two foods have similar flavors, in fact, and in supermarkets fennel is sometimes referred to as anise, even though they're different plants.

Fennel can be eaten raw or roasted, but you may get the best cold-fighting benefit from drinking a tea made from fennel seeds. Try Yogi Tea's Throat Comfort, or make your own with 1.5 teaspoons of fennel seeds and one cup boiling water. Steep for 15 minutes, strain, and sweeten with honey to taste.

Yogurt and kefir

We usually think of bacteria as a bad thing, but some of these microorganisms are essential for good health. Eating probiotic foods, such as yogurt and kefir, is a good way to replenish beneficial strains of bacteria, which promote digestive health and help prevent stomach ailments. "There are over 10 trillion bacteria living in our gastrointestinal tract, so you want to make sure the good ones outnumber the bad ones," Ansel says.

The benefits of good bacteria may go beyond our gut. A 2011 review of the research found that consuming probiotics — whether in food or supplement form — lowers the risk of upper respiratory tract infections better than a placebo.

Tea

Everyone knows a steaming hot cup of tea can help break up chest congestion and soothe a sore throat, but the benefits may run deeper.

All tea — black, green, or white — contains a group of antioxidants known as catechins, which may have flu-fighting properties. In a 2011 Japanese study, people who took catechin capsules for five months had 75 percent lower odds of catching the flu than people taking a placebo.

Need another reason to turn on the kettle? Other research suggests catechins may help boost overall immunity, rev metabolism, and protect against cancer and heart disease.

Red peppers

Like citrus fruits, red peppers are high in vitamin C. In fact, one red pepper has 150 milligrams of the nutrient — that's twice the recommended daily allowance for women. (A large orange, by comparison, only has about 100 milligrams.)

Even that may not be enough, however, as studies suggest you need much more than that to harness the nutrient's cold-fighting benefits. "If you're sick, you should be eating a lot of vitamin C throughout the day — 400 to 500 milligrams," Ansel says.

Milk

Much of the vitamin D that our bodies need to build strong bones, defend against heart disease, and — you guessed it — bolster our immune system is produced when the sun's rays interact with our skin cells. But this key vitamin is also found in fortified foods such as milk, orange juice, and breakfast cereal.

Getting your daily dose of vitamin D may keep colds at bay. A 2009 study from Massachusetts General Hospital found that lower vitamin D levels were associated with a greater risk of upper respiratory infections. In 2012, the same researchers found that Vitamin D supplements can help ward off kids' winter colds, as well.

Mushrooms

When it comes to mushrooms, your choices are many: White button, Portobello, shiitake, and Maitake are just a few of the varieties you'll find in your grocery store. Fortunately, just about all mushrooms contain some form of immune-boosting antioxidants, along with potassium, B vitamins, and fiber.

Shiitakes, for example, contain lentinan, a nutrient that is thought to have anticancer properties. Other varieties, such as certain brands of Portobello, are grown in ultraviolet light to spur vitamin D production.

Skinless turkey breast

Lean proteins, such as turkey breast with the skin removed, are high on Ansel's list of flu fighters. "We think we need protein to build muscle, and we do — but actually, we need it to build antibodies and fight infection in the body, as well," she says.

Chicken, turkey, and pork are all good sources of protein, but you can also get plenty from meatless sources such as beans, nuts, and dairy.

Leafy greens

The darker the greens, the higher the nutrient content. So when you're shoring up your defenses for cold and flu season, choose arugula and kale over iceberg lettuce.

Bitter greens like arugula may even help relieve chest congestion, sniffles, and coughs. How? It's not entirely clear, although a 2011 British study found that mice that were fed green vegetables had more infection-fighting white blood cells in their intestines than those who were not.

Blueberries

These antioxidant powerhouses are bite-sized immunity boosters, especially when they grow in the wild. In 2007, Cornell University scientists found that wild blueberries contained the most active antioxidants of any fresh fruit, thanks to their high levels of anthocyanins — one of the most potent antioxidants.

Dark chocolate

Ounce for ounce, pure cocoa contains more of the disease-fighting antioxidants known as polyphenols than most berries — and it's loaded with zinc, to boot.

Too often, however, the nutritional benefits of cocoa are overshadowed by the sugar and saturated fat found in chocolate bars and other treats. To reap the immunity-boosting benefits without the unhealthy extras, stick with bite-sized portions — about one quarter-ounce per day — of dark chocolate with a cocoa content of 70 percent or higher.

Brazil nuts

These rich, creamy nuts are high in protein, healthy fats, and selenium, a mineral that's essential for proper immune function and may help guard against infections and flu. In a 2001 study, University of North Carolina researchers found that mice infected with the flu virus showed higher levels of inflammation if they were deficient in selenium.

Your body only needs a small amount of selenium, though, and getting too much may actually raise your risk for certain diseases. Just one nut contains more than a day's recommended value, so eat these treats sparingly.

Carrots and sweet potatoes

Orange fruits and vegetables, such as carrots and sweet potatoes, are rich in beta-carotene. When we eat these foods, our bodies convert this organic compound into vitamin A, which is essential for maintaining a strong immune system.

Vitamin A is especially important for areas that go haywire when we catch a cold: It keeps the mucous membranes that line our nose and throat — one of the body's first lines of defense — healthy and functioning properly.

Sunflower seeds

These crunchy snacks are among the best natural sources of vitamin E, an antioxidant that protects cell walls from damage; a single one-ounce serving contains 30% of your recommended daily intake. (For a healthier choice, be sure to choose dry-roasted seeds over those roasted in oil.)

Vitamin E may be especially important for the health of our lungs, where it appears to fight the harmful process known as oxidative stress. A 2003 study in Scotland found that people with diets high in vitamins C and E had greater lung capacity and produced less phlegm.

Oats

Whether you eat them in a bowl or a bar, oats contain a type of fiber called beta-glucan, known for its cholesterol-lowering and immune-boosting properties.

Animal studies have shown that beta-glucan from oats can help prevent upper respiratory tract infection, and a few controlled trials have suggested that beta-glucan consumption can alter white blood cell activity in humans, as well.

For more from health.com: