12 Plants That Naturally Help Keep Garden Pests Away

Most advice about pest-repelling plants promises more than a plant can deliver. A row of marigolds along a vegetable bed will not stop aphids from finding your kale. A pot of basil beside the patio table will not clear the air of mosquitoes. What these plants can do is narrower, and in some ways more useful. Some mask the scent of the crop an insect is hunting for. Some give pests an easier place to land. Some draw in the predators that eat them. One or two work underground against nematodes.

Once you know which job a plant does, you know where to put it and when to stop expecting results. The twelve plants below are ranked by how well that job is supported, not by how often they appear on “companion planting” lists.

What “Repelling” Actually Means in a Garden

Four mechanisms account for nearly everything on the usual lists.

Scent masking. Many insects find host plants partly by smell. A bed with strongly aromatic plants mixed in makes that search harder. This is the idea behind rosemary near carrots and chives near roses. It is plausible, and field results vary, so treat it as a modest advantage rather than protection.

Trap cropping. A plant more attractive to the pest than your crop pulls it away. Nasturtiums for aphids are the classic case. This works only if you manage the decoy.

Attracting predators. Hoverflies, lacewings and parasitic wasps eat or parasitize pests, and they feed on nectar and pollen as adults. Small, open flowers such as chives, marigolds and lavender feed them, so more beneficial insects are around when aphids show up.

Soil effects. Certain marigold varieties release compounds from their roots that suppress particular root-knot nematodes. This is among the better-documented effects on the list, and it is very specific.

Evidence from laboratory tests, where an insect is exposed to concentrated plant oil in a small chamber, does not carry over to a living plant in an open garden. Where that gap matters below, it is flagged.

The 12 Plants

1. Marigolds: Proven Against Root-Knot Nematodes, Modest Everywhere Else

The strongest case for marigolds is underground. French marigolds (Tagetes patula) and some other Tagetes species release compounds from their roots that suppress certain root-knot nematodes, the microscopic worms that cause swollen, knotted roots on tomatoes, carrots and peppers. The effect depends on the variety, because not every marigold in a garden centre has been shown to do it. It also depends on density and time. A scattering of plants will not do much. A solid planting through a full season, sometimes dug into the soil afterward, is what trials have usually tested.

Above ground the claims get weaker. The pungent foliage may confuse some insects, but results are inconsistent. The better-supported benefit is that single-flowered types feed hoverflies, whose larvae eat aphids. Fully double blooms are poor for this because pollinators can’t reach the nectar.

Marigolds also have pest problems of their own. Slugs and snails eat seedlings, and spider mites can build up in hot, dry weather. Sow after the last frost, space plants about 20 to 25 cm apart, and deadhead to keep them blooming.

2. Nasturtiums: A Decoy for Aphids, If You Manage the Decoy

Nasturtiums are favoured by black bean aphids and by the caterpillars of cabbage white butterflies. That is the point. If aphids settle on a nasturtium patch, they are not on your beans. The same applies to cabbage white eggs that might otherwise land on brassicas.

The catch is that an unmanaged decoy becomes a breeding ground. When a nasturtium is heavily infested, pull it, bag it and throw it out, or blast it with water, before the population spreads to nearby crops. Set trap plants a few metres from the crop, not touching it. Don’t eat leaves or flowers from plants you’ve sprayed or from heavily infested ones.

Nasturtiums do best in poor, fairly dry soil. Rich soil gives lush leaves and few flowers, which makes for a better aphid hotel and a worse ornamental. Sow the large seeds directly, about 1 to 2 cm deep, once the soil has warmed.

3. Lavender: Better at Deterring Deer and Rabbits Than Insects

Lavender’s reputation as an insect repellent is mostly traditional. The sachets that protect wool from moths are made with dried flowers, and there is little rigorous evidence that a living plant does the same job in a garden. What is well reported is that deer and rabbits tend to leave it alone, and many extension-service lists of deer-resistant plants include it. No plant is deer-proof when animals are hungry enough, but lavender is among the safer bets.

Its other contribution is flowers that bees and beneficial insects visit heavily, which helps if you’re building a supply of predators.

Lavender is demanding in one way: drainage. It wants full sun, sharp drainage and neutral to alkaline soil. In heavy clay or a wet climate, plant it on a mound or raised bed, and mulch with gravel rather than bark, which holds moisture against the crown. Prune lightly after flowering and never cut into old bare wood, because it often will not regrow. English lavender (Lavandula angustifolia) tolerates colder winters than French or Spanish types.

4. Rosemary: A Scent Barrier Around Carrots and Brassicas

Rosemary is a standard companion for carrots, cabbage and beans. The usual claim is that its volatile oils disrupt carrot rust fly and cabbage moths as they search for a host. The reasoning holds up and the field evidence is thinner, so treat it as a plausible helper, not a guarantee. Deer and rabbits usually avoid it too.

Placement matters more than for most plants here. One rosemary bush at the end of a bed does little. Planting it along the bed’s edge or between rows gives a broader scent field. For carrot rust fly specifically, fine insect-proof row cover is more reliable, and rosemary can sit alongside it.

Rosemary is a Mediterranean shrub. It likes sun, drainage and neglect, and it dies of wet winter soil more often than of cold. Many varieties survive winters down to roughly -7 to -10°C, and a few are hardier. In colder regions, grow it in a pot and bring it into a bright, cool spot over winter.

5. Basil: Worth Planting Near Tomatoes, Not Counting on Against Mosquitoes

Laboratory studies show basil essential oils repel mosquitoes. A potted basil plant on a patio table releases only a small amount of those oils unless the leaves are bruised, so it will not protect you in open air. The effect is a lab result about oil, not a result about plants.

The folk claim that basil near tomatoes discourages hornworms and whiteflies is also thinly supported. Basil is still worth growing there because the two crops share the same needs: warmth, sun and regular water. In some regions basil is itself eaten by slugs and Japanese beetles, so it can attract pests as well as discourage them.

Pinch off flower buds if you want leaf production. Letting some plants flower feeds pollinators but makes the foliage bitter. Basil needs warmth. Sow or transplant only after nights stay above about 10°C, because cold turns the leaves black.

6. Mint: Deal With the Spread Before You Count on the Scent

Mint’s oils repel some insects in laboratory tests, and gardeners use it against ants, aphids, flea beetles and cabbage moths. The field evidence is again modest. The real decision with mint is containment.

It spreads by underground runners and will take over a bed in a season or two. Plant it in a container. If you bury a pot, leave the rim 2 to 3 cm above soil, and lift it every year, because roots can escape through drainage holes. A pot of mint by a doorway where ants enter is reasonable, but evidence that it stops them is anecdotal.

Be careful with species. Pennyroyal, sometimes sold as a flea and ant repellent, is toxic to people and pets and should be avoided. Even ordinary mint can bother cats and dogs if they eat a lot. Cut mint back before it flowers to keep it tidy, or leave a few stems for pollinators.

7. Chives: Low-Effort Edging That Rabbits and Deer Tend to Skip

Chives belong to the onion family, and the sulfur compounds that make them pungent are what deer and rabbits usually avoid. That makes them useful as an edging for beds that animals raid. Chives around roses or fruit trees are a long-standing folk remedy for aphids, but the supporting evidence is limited. The flowers are a more reliable benefit, since bees, hoverflies and other beneficials work them heavily.

Chives are hardy, perennial and easy. A clump divides well every three or four years. Cut spent flower heads before seeds drop, since garlic chives (Allium tuberosum) self-seed aggressively. The blooms are edible and look good in salads.

8. Garlic: Useful as a Side Effect, and the Spray Needs Care

Planting garlic among roses, lettuce or brassicas is common advice. The effect on pests is hard to pin down, and the crop is the main reason to grow it.

Garlic spray is the more concrete use. People steep crushed cloves in water, strain the liquid, add a few drops of dish soap so it clings, and spray it on aphids and mites. Strength varies enormously from batch to batch, it can burn leaves, and it can harm beneficial insects as readily as pests. Test it on one leaf first, wait a day or two, and spray in the evening when bees are not active.

In cold-winter regions, plant cloves in autumn, roughly four to six weeks before the ground freezes. Plant them pointy end up, about 5 cm deep and 10 to 15 cm apart. Harvest the following summer when lower leaves turn yellow.

9. Catnip: The Mosquito Research Is About Oil, and Cats Complicate Things

Nepetalactone, the compound in catnip, repels mosquitoes in lab tests when extracted and applied as oil. A plant in the ground releases very little unless the leaves are crushed. Like basil, catnip comes with a laboratory result that doesn’t carry over to a bed.

Cats are the other problem. They roll in it, chew it and flatten young plants, and they may then use the surrounding soil, vegetables included, as a litter tray. If you grow it near crops, protect seedlings with a wire cage until established.

Catmint (Nepeta × faassenii) is usually the better garden choice. It is a closely related hybrid that cats ignore more, deer tend to avoid, and pollinators love. Cut it back hard after the first flush and it reblooms. True catnip self-seeds freely and gets tall and floppy.

10. Chrysanthemums: The Pyrethrum Story Applies to Specific Daisies

This is the most misunderstood entry on the list. Pyrethrins, the insecticidal compounds in many commercial sprays, come from the flowers of Tanacetum cinerariifolium (Dalmatian pyrethrum) and, to a lesser extent, T. coccineum (painted daisy). The potted autumn chrysanthemums sold at garden centres are a different plant, Chrysanthemum morifolium. They have no documented use as a pest repellent, and they get aphids and spider mites themselves.

Homemade infusions of pyrethrum flowers are inconsistent in strength and broadly toxic. They harm bees, beneficial insects and fish, and some pets react badly. If you want pyrethrin, buy a labelled commercial product and follow the label. Grow painted daisies because they’re attractive, not because you expect a pesticide.

11. Lemongrass: Useful Near a Seating Area, Not a Barrier

Citronella oil comes from related grasses (Cymbopogon nardus and C. winterianus). Edible lemongrass (C. citratus) has a similar lemony scent but is not the same plant, so the research on citronella doesn’t transfer directly. Like basil and catnip, a living clump releases little scent unless leaves are bruised.

It still makes a good tall screen beside a seating area, since a clump reaches 1 to 1.5 m, and you can crush a few leaves when you sit down. It is a tender perennial that likes heat, sun and plenty of water. Below frost it should be potted and brought indoors. Leaf edges are sharp enough to cut skin. Lemongrass is also listed as toxic to cats and dogs by the ASPCA.

12. Tansy: An Old Reputation With Real Drawbacks

Tansy (Tanacetum vulgare) was historically strewn indoors against flies and ants, and some small studies suggest effects on certain beetles and ants. Its compounds include thujone and camphor, and the plant is toxic if eaten by people, livestock or pets. The sap can irritate skin.

It is also invasive. It spreads by rhizomes and seed, and several US states and Canadian provinces list it as a noxious weed. Check local invasive-species rules before buying. If you grow it at all, keep it in a pot, remove flower heads before seeds form, and wear gloves. For most gardens, yarrow or catmint will bring in beneficial insects without the baggage.

Matching Plants to the Pest You Actually Have

ProblemPlants worth tryingReality check
AphidsNasturtium (decoy), chives and marigolds (attract predators)Decoys must be removed when infested
Root-knot nematodesFrench marigolds, grown densely for a full seasonVariety-specific; slow; not a rescue for badly infested soil
Carrot rust fly, cabbage mothsRosemary, chives along the bed edgeRow cover is more dependable
Deer and rabbitsLavender, rosemary, chives, garlic, catmintHungry animals will still sample them
AntsMint in pots near entry pointsAnecdotal
MosquitoesNone dependableEmptying standing water and using a fan work far better

Mosquitoes deserve a note. The most effective garden control is eliminating standing water where they breed: saucers, buckets, gutters, bird baths you rarely refresh. On a patio, a fan moving air across the seating does more than any pot of herbs.

Getting Plants to Do Their Jobs

Four decisions matter more than which plant you pick.

Plant before the pest arrives. Repellent and decoy effects work best if the plants are established when pests show up. Marigolds or nasturtiums sown the day aphids appear will be too late.

Use enough of them, in the right place. One plant in a corner has little effect. Rosemary and chives work better as continuous edging. Trap plants belong a few metres from the crop.

Disturb the leaves. Basil, lemongrass, catnip and mint release more scent when brushed or crushed. They won’t release much sitting still.

Combine with physical controls. Row cover, hand-picking and good watering habits do the heavy lifting. Plants add a layer.

An Example Layout for a Small Vegetable Bed

This is an illustrative layout, not a tested one. On a bed about 1.2 m wide and 3 m long, you might do the following:

  • Plant French marigolds at both ends and between tomatoes, spaced about 20 to 25 cm apart.
  • Set chives along the long edge as a border.
  • Put basil at the base of the tomatoes.
  • Keep a pot of rosemary at one corner.
  • Grow a patch of nasturtiums a couple of metres away in a separate spot, as a decoy to check weekly.

Plants That Can Become Problems

Several plants here can spread or cause harm, so contain them from the start.

  • Spreaders: mint and tansy spread by runners. True catnip and garlic chives self-seed. Grow them in containers or remove flower heads before they set seed.
  • Pets and children: The ASPCA lists a number of these plants as toxic to cats and dogs, including garlic, chives, mint, lemongrass, lavender and chrysanthemums, with severity depending on the amount eaten. Tansy is toxic to people and livestock. If you have animals that chew plants, check the ASPCA’s plant database for each species before you plant.
  • Handling: Wear gloves with tansy and lemongrass, and wash hands after handling any homemade spray.

Frequently Asked Questions

How many plants do I need before I’ll see any effect?
There is no tested number. For border plants such as chives and rosemary, a continuous line works better than isolated plants. For marigolds against nematodes, trials have used dense plantings across the whole area. Start with the plant that matches your main pest and see what changes over a season.

Can I grow these in pots instead of the ground?
Most can, and mint, catnip, tansy and lemongrass are better in pots. A container works for scent-based plants only if it is close to what you’re protecting. For nematode suppression, marigolds need to be in the soil you’re treating.

Why did I get more pests after planting these?
Some plants attract pests. Nasturtiums draw aphids on purpose, and basil and chrysanthemums can host their own. It may also be coincidence, since pest numbers swing by season. If one plant is clearly the source, move it or remove it.

Final Thoughts

Pick plants by the pest you actually have, not by a list. French marigolds make sense if you have root-knot nematodes. Nasturtiums make sense as a managed decoy for aphids. Lavender, rosemary and chives are the better choices if deer and rabbits are the issue. For mosquitoes, the plants help little, and draining standing water helps a lot. Whatever you plant, contain the spreaders, check the pet-toxicity lists, and treat the plants as one layer beside row cover, good watering and regular inspection.