Companion planting can help with garden pests, but mostly in three specific ways: trap crops that pests prefer (Blue Hubbard squash for squash bugs and cucumber beetles, spicy mustards and arugula for flea beetles), small-flowered plants such as sweet alyssum, dill and cilantro that feed the predators and parasitic wasps that eat pests, and mixed plantings that make crops harder for pests to find. Long online lists of plants that "repel" pests are often not backed by research; marigolds, for example, did not deter Colorado potato beetles in multiple studies.
Pest control is the reason many gardeners try companion planting in the first place, and it is also where the advice gets the most unreliable. Some pairings have real research behind them. Others are repeated from chart to chart without much evidence at all. This guide sticks to what university extension services say works, explains how to set up a trap crop and an insect-friendly border, and flags the popular claims that research does not support. To check whether the plants you choose also get along as neighbors, use our companion planting checker.
How companion plants affect pests
University of Minnesota Extension describes three main ways companion plants can help manage insects:
- Smell. Plant odors can attract pests, repel them or mask the scent of the crop they are looking for. That is what makes trap crops (plants that pull pests away) and repellent crops possible, and a mix of scents can make insects less likely to land on your vegetables at all.
- Attracting natural enemies. Predators eat pest insects, and parasitoids (mostly tiny wasps and flies) lay their eggs in them. Flowers give these helpers food and shelter, so they stay in the garden.
- Visual confusion. Some pests find their host plants by leaf shape or color. A bed full of one crop is easy to find; a mix of heights, colors and textures is harder.
The same source cautions that online charts of pest-repelling plants are not always accurate or backed by research, which is why the table below separates pairings with research support from popular claims without it.
Pest-control pairings: what the research supports
These pairings are summarized from University of Minnesota Extension's review of companion planting research unless another source is named. "Research support" means studies found a benefit; it does not mean a guaranteed result in every garden.
| Pest | Crop to protect | Companion or tactic | Evidence |
|---|---|---|---|
| Flea beetles | Cabbage family (broccoli, cabbage, kale) | A trap crop of "spicier" brassicas such as arugula, mustard or napa cabbage | Research support Well documented as a trap crop; mixing three or more trap species worked better than one |
| Cabbage looper and imported cabbageworm | Broccoli and cabbage | Thyme, onion and nasturtium near broccoli; marigold, onion and nasturtium near cabbage | Research support Reduced caterpillar damage in an Iowa study |
| Diamondback moth | Brussels sprouts and other cabbage-family crops | Sage and thyme nearby; collards as a trap crop | Some support Sage and thyme cut moth numbers in a greenhouse study; Virginia Extension gives collards as a trap-crop example |
| Thrips | Tomatoes | Basil and marigolds interplanted | Some support A few field and greenhouse studies show fewer thrips |
| Squash bugs, cucumber beetles, squash vine borer | Squash, zucchini, pumpkins, cucumbers | Blue Hubbard squash as a trap crop around the bed | Research support Strong: very attractive to all of these pests in Lincoln University research |
| Squash bugs and cucumber beetles | Squash | Nasturtiums and marigolds nearby | Research support Research support, including an Iowa study showing less damage |
| Aphids | Squash (and most crops) | Sweet alyssum and African marigolds, or other small-flowered plants | Research support More aphid predators and parasitoids; a Florida squash study also saw a slight yield gain |
| Corn earworm | Sweet corn | Flowering buckwheat, cowpea or sunn hemp alongside | Some support More predators and parasitoids of the earworm |
| Root-knot nematodes | Many vegetables | Certain marigolds grown as a solid planting the season before | Some support Works as a cover planting; interplanting marigolds among crops probably does not |
| Colorado potato beetle | Potatoes | Marigolds | Not supported Multiple studies found no effect, so do not rely on it |
| Flea beetles | Cabbage family | Marigolds or green onions as repellents | Not supported Little research support, and some studies contradict it |
Trap crops: give pests something they like better
A trap crop is a plant a pest prefers, grown so the pest gathers there instead of on your main crop. It is a sacrifice, and it only works if you deal with the pests once they arrive. The best-documented home-garden example is Blue Hubbard squash for squash pests.
Blue Hubbard squash for squash bugs, cucumber beetles and vine borers
Research by Lincoln University's IPM program, summarized by University of Missouri IPM, found Blue Hubbard squash very attractive to squash bugs, squash vine borers and both striped and spotted cucumber beetles. Their advice for gardens:
- Make the trap plants bigger than the crop
Transplant 2-week-old Blue Hubbard seedlings at the same time you sow your squash or cucumbers. If you grow the main crop from transplants, set the Blue Hubbard out at least 2 weeks earlier.
- Plant enough, in the right place
For a small garden of about 100 cucurbit plants, the researchers had success with 6 to 8 Blue Hubbard plants at the corners, about 3 to 8 feet from the main crop.
- Deal with the pests on the trap plants
Pests that gather on the trap plants must be removed, or they breed there and move on to your crop. Check the trap plants often and hand-pick bugs and egg masses.
- Keep the trap plants healthy
Water and feed them like the main crop. A stressed or smaller trap plant is less attractive.
University of Connecticut IPM describes a fuller version, a perimeter trap crop that rings the whole planting without large gaps, used together with crop rotation. Both extension sources also describe treating only the trap plants with an insecticide; if you go that route, follow the product label exactly and ask your local extension office what suits a home garden.
Mustards and arugula for flea beetles
Flea beetles chew small shot holes in cabbage-family leaves. University of Minnesota Extension says it is well documented that spicier brassicas, including arugula, mustard, rapeseed and napa cabbage, can serve as flea beetle trap crops, and that a mix of three or more species works better than a single one. Sow a strip of mixed mustards and arugula near (not among) your broccoli, cabbage or kale.
Nasturtiums for aphids
University of Vermont Extension calls nasturtiums a magnet for aphids and suggests planting them a little away from aphid-prone crops such as cabbage and green beans. More in our nasturtium companion plants guide.
Flowers that bring in the pest-eaters
Often the simplest and most reliable approach is to feed the insects that eat pests. Clemson Extension notes that ladybugs, ground beetles, assassin bugs, parasitic wasps, syrphid (hover) flies and others help manage pests, and that small-flowered plants such as sweet alyssum, cilantro, parsley, dill, buckwheat and fennel are especially attractive to the tiny parasitic wasps and flies. University of Minnesota Extension gives syrphid flies as an example: the adults visit many kinds of flowers, and their larvae eat large numbers of aphids.
Penn State Extension groups good insectary plants by family:
- Carrot family (dill, cilantro/coriander, caraway, fennel): especially attractive to small parasitic wasps and flies.
- Aster family (yarrow, cosmos, coreopsis, sunflowers, signet marigolds): attract larger predators such as lady beetles and soldier beetles.
- Legumes (clovers, vetch, fava beans): cover crops that many beneficial insects visit.
- Mustard family (sweet alyssum, mustards): attract natural enemies of cabbage-family pests, but Penn State suggests planting the mustards themselves away from the garden because they attract pests too.
Clemson also advises avoiding broad-spectrum insecticides in the garden, because they kill these beneficial insects along with the pests, which can let pest numbers rebound.
Popular claims with little support
- Marigolds keep Colorado potato beetles off potatoes. University of Minnesota Extension says multiple studies have shown this to be untrue.
- Marigolds or green onions repel flea beetles. The same source finds little research to support this, and some studies contradict it. Use a mustard trap crop instead.
- Marigolds planted between crops stop nematodes. Certain marigolds do suppress root-knot nematodes, but University of Florida Extension says that works when they are grown as a solid planting, and interplanting them with crops probably does not help. See what marigolds really do.
- Any plant on a "repels pests" list will protect your crop. Many charts mix tradition, observation and research without saying which is which. Treat pairings as good habits that can tip the odds, not guaranteed pest control.
Put it together: a pest-smart garden plan
- Know your likely pests.
Squash bugs and cucumber beetles on cucurbits, flea beetles and cabbageworms on the cabbage family, and aphids almost everywhere are the usual suspects.
- Mix your beds.
Avoid long blocks of one crop. Pick companions in the checker so mixed beds are also good neighbors.
- Add a trap crop where it fits.
Blue Hubbard at the corners of the squash patch; a strip of mustards and arugula near the cabbage family; nasturtiums a little away from aphid-prone crops.
- Edge beds with small flowers.
Sweet alyssum, dill, cilantro, buckwheat and yarrow along edges and corners feed hover flies and parasitic wasps.
- Interplant studied herbs and flowers.
Basil and marigolds with tomatoes; thyme, onions and nasturtiums near broccoli and cabbage.
- Scout weekly and keep it simple.
Check trap crops and undersides of leaves, hand-pick what you find, and rotate crop families each year.
For which crops get along in general, see our companion planting chart and what not to plant together.
Frequently asked questions
Does companion planting really keep pests away?
Sometimes. University of Minnesota Extension reviews research showing that certain trap crops, flowers that attract natural enemies, and mixed plantings reduce some pests, but many popular pest-repelling claims are not backed by research. Treat it as one tool, not guaranteed pest control.
What is the best trap crop for squash bugs?
Blue Hubbard squash. Lincoln University research found it very attractive to squash bugs, squash vine borers and cucumber beetles. Plant it so it is larger than your main crop, and remove the pests that gather on it.
Do marigolds repel pests?
Not as broadly as often claimed. Studies found marigolds did not deter Colorado potato beetles, and there is little support for marigolds repelling flea beetles. Some research shows benefits with tomatoes (thrips) and squash, and certain marigolds suppress root-knot nematodes when grown as a solid planting.
What flowers attract beneficial insects to a vegetable garden?
Small-flowered plants such as sweet alyssum, dill, cilantro, parsley and buckwheat attract tiny parasitic wasps and hover flies, and aster-family flowers such as yarrow, cosmos and sunflowers attract lady beetles and other larger predators.
What can I plant to keep flea beetles off my cabbage and broccoli?
A trap crop of spicier brassicas such as arugula, mustard or napa cabbage works better than repellent plants, and University of Minnesota Extension notes that a mix of three or more trap species is more effective than one.
Pick your crops, trap plants and flowers, and see which belong in the same bed.
Open itSources
- Virginia Cooperative Extension, "Companion Planting in Gardening" (SPES-620P)
- University of Maryland Extension, "Vegetable Succession and Companion Planting"
- Oregon State University Extension, "Companion Planting"
- Penn State Extension, "Herbs Make Good Plant Partners and Companions"
- University of Minnesota Extension, "Planting the vegetable garden"
- USDA Plant Hardiness Zone Map
- NOAA NCEI U.S. Climate Normals (frost/freeze data)
- University of Minnesota Extension, "Companion planting in home gardens"
- University of Missouri IPM (Lincoln University), "Trap cropping: A simple, effective, and affordable IPM strategy to control squash bugs and squash vine borers"
- University of Connecticut IPM, "Directions for Using a Perimeter Trap Crop Strategy to Protect Cucurbit Crops"
- Clemson Cooperative Extension HGIC, "Attracting Beneficial Insects to Your Vegetable Garden"
- Penn State Extension, "Attracting Beneficial Insects"
- University of Florida IFAS Extension, "Marigolds (Tagetes spp.) for Nematode Management" (ENY-056)
- University of Vermont Extension, "Creating a Biodiverse Vegetable Garden"
Pairings are summarized in our own words from extension-service guidance. Research support for many companion effects is limited, so treat them as good habits, not guarantees.