Skip to main content

11 plants and flowers that keep bugs away from your vegetable garden for a pest-free harvest

From marigolds to alliums, here are gorgeous, pest-repelling flowers to plant in your garden

A basket of colorful petunias
Shafin.ad8/Shutterstock

Aside from looking beautiful, flowers and other plants can bring additional benefits to your vegetable garden. By mixing the following plants in with your tomatoes, cucumbers, squash, and other veggies, you’ll have a bit of natural help in preventing pests from infecting your garden. Best of all, these plants offer natural bug prevention that, hopefully, will help limit how much insecticide you’ll need to use if insects start to take over a plant. Here are our favorite plants and flowers that help keep bugs away from the vegetable garden.

Potted marigolds
Yui Yuize / Shutterstock

1. Marigolds

Marigolds are great help for repelling aphids and mosquitoes, as well as small animals such as rabbits. Because they’re on the smaller side, these pretty, golden flowers can easily be mixed throughout your garden without much risk of them getting too big.

To be their best and happiest selves, marigolds should be planted in a location with full sun. They aren’t too picky and will grow in any decent garden soil, so long as it’s not too acidic. Marigolds don’t like to be left in dry soil for more than a couple days, especially during the hotter parts of the season; however, once they’re established in your garden, they can be somewhat drought tolerant. You just won’t see as many blooms if you forget to water them.

A bunch of pink petunia blooms
Irina Iriser/Unsplash

2. Petunias

Petunias help repel aphids, asparagus beetles, leafhoppers, squash bugs, and tomato hornworms. If you love growing tomatoes, you can plant petunias alongside basil interspersed throughout the tomatoes to increase natural pest prevention.

Petunias prefer at least six to eight hours of sun a day. However, in the hottest part of the summer, partial shade can be beneficial to help keep blooms looking happy and healthy. They enjoy well-draining soil and don’t like to dry out too much between waterings. You should aim to not let the soil dry out more than two inches from the top, but take care not to overwater them, either.

Planter with red geraniums
Shutterstock/Jennifer Bosvert

3. Geraniums

Geraniums can repel leafhoppers, mosquitoes, and other types of insects. When taken care of properly, they’ll reward you with beautiful blooms and add a lovely pop of color to an otherwise mostly green garden.

Geraniums can grow happily in locations with full sun to partial shade. The best environment to promote blooms is one that gets full sun in the mornings and evenings but that provides partial shade at the hottest point of the day. Geraniums are relatively drought-tolerant flowers that you can leave dry for a couple of days before they show any adverse effects.

Lemongrass bundle
NUM LPPHOTO/Shutterstock

4. Lemongrass

Lemongrass plants help repel mosquitoes, which makes working in the garden a nicer environment — especially during the more humid days when bugs are out in abundance. Nobody wants to get bitten all over while tending to their veggies, so this plant is really more for you than it is for the health of your crops.

Lemongrass prefers locations with full sun and will actually attract pests when planted in the shade. Keeping the soil moist will result in the best growth, as lemongrass is native to hot and humid environments. Plant lemongrass outdoors around the same time you would plant tomato plants.

Growing rosemary
congerdesign / Pixabay

5. Rosemary

Rosemary is another plant that helps repel mosquitoes and other insects. At the very least, it will make your gardening environment more pleasant (and when it comes time to harvest, you’ll have some nice, fresh herbs for garnishing your dishes).

Rosemary care is relatively simple. Like a lot of herbs, it does best in full sun and well-draining soil. Rosemary should be watered when the soil is dry. Other than that, it can tolerate a range of humidity levels as well as high temperatures.

Orange nasturtium flowers
Nadya So/Shutterstock

6. Nasturtiums

Nasturtiums can potentially repel aphids, cabbage loopers, squash bugs, whiteflies, and a variety of beetles. They grow best in full sun locations, though they can tolerate a little shade (especially when it protects them from afternoon heat). They like well-draining soil and prefer an average amount of water, but they can tolerate dry soil for a day or two.

A beautiful yellow chrysanthemum
Jason Leung / Unsplash

7. Chrysanthemums

Chrysanthemums (or mums, for short) are great for repelling ants, cockroaches, Japanese beetles, ticks, and more. These showy flowers can help repel bugs that other plants don’t, making them perfect for planting alongside plants like petunias or marigolds to ward off a wide variety of pests.

Chrysanthemums bloom and thrive best with six to eight hours of sunlight per day; however, they can grow in partial shade locations. They prefer having evenly moist soil and hate soggy roots. Avoid planting these flowers near night lights or other artificial lighting, as that can actually affect their blooming cycle.

Pitcher plant in a garden
My September/Shutterstock

8. Pitcher plants

As opposed to repelling pests, pitcher plants are actually carnivorous plants that trap and eat insects. These plants are great to have in your garden if you’re within their growing zone (USDA zones 6 through 8) because they’ll help take care of the bugs that make their way in despite all your preventative measures.

Pitcher plants, like most carnivorous plants, do best in full-sun locations. You’ll know if your pitcher plant isn’t getting enough light when the leaves or pitchers start to droop. These plants prefer moist, well-draining soil. Take caution not to drown your plant, but remember that it also doesn’t like to dry out much. For pitcher plants, it’s important to water the whole plant (not just the base) so that the pitcher and leaves also get some moisture.

Purple pink allium flowers
Laura Ockel/Unsplash

9. Alliums

Alliums are great for repelling aphids, cabbage worms, carrot flies, and slugs. The beauty of a lot of these plants is that sometimes there’s overlap in the pests they deter, and sometimes you can plant a variety to help keep away a large number of pests instead of just a few. Even better, the Allium genus includes hundreds of plant species, including some popular herbs and vegetables you might want to plant in your garden: garlic, onions, leeks, chives, and scallions, just to name a few.

The healthiest alliums will love six to eight hours of sun per day. They can grow in partial shade, but their growing seasons are quite short. If you want the best results outside of just pest prevention, sunny spots will be much better for these plants. Alliums hate staying wet for too long, especially during dormancy, so take care to plant them in well-draining soil and water infrequently.

Growing chives
Melinda Nagy/Shutterstock

10. Garlic chives

Garlic chives are another great plant to pair with tomatoes, as well as carrots and roses. Not only do they help deter Japanese beetles from infesting your garden, but they can also help prevent black spots on your roses!

Garlic chives grow fine in partial shade, but they’ll thrive in full sunlight. They prefer dry to medium soil that drains well, and although they can be tolerant of drought, you’ll find that your garlic chives do much better when the soil is kept moist (not soggy). Flowers should be deadheaded before they go to seed if you aren’t interested in a natural spread.

A field of lavender flowers
freya-photographer / Shutterstock

11. Lavender

While humans might love lavender-scented lotions and potions, insects, particularly flies, moths, and mosquitoes, absolutely detest the smell of lavender oil. You can pair lavender with roses and other herbs, and you can also use it for lovely dried flower bouquets around your home. Like lemongrass, it’s really more for you than your crops, but a conducive gardening environment means that you’ll be able to focus on your crops uninterrupted! Plus, lavender also attracts beneficial insects, such as honeybees.

Lavender does well in hot, dry climates. It’s a relatively low-maintenance plant, but it does require full sun and well-draining soil to thrive. You actually won’t need to fertilize your lavender flowers very often; adding compost to your soil when you plant your lavender should be sufficient.

A honey bee on a flower
Dancestrokes/Shutterstock

Not all insects will harm your garden

As mentioned above, some plants will actually help bring beneficial insects to your vegetable garden. The flowers that help keep pests away will have a hand in attracting additional pollinators such as honeybees, which may end up resulting in a larger harvest for you. There are also many plants that attract bugs that eat pests, and those are equally as valuable to the average gardener.

Veggie gardens don’t have to be strictly vegetables, and mixing in these flowers and plants will give your plot pops of color and natural pest prevention.

Editors' Recommendations

Kiera Baron
Former Digital Trends Contributor
Kiera Baron is a freelance writer and editor, as well as a budding digital artist, based in Upstate NY. She is currently one…
Wondering what to plant in October? Here are the best flowers and vegetables for autumn
Tips for picking out the best plants to start in autumn
View of a vegetable garden

Your gardening season doesn’t have to be over when the leaves and temperatures start to fall. October is a great time for planting. The mild days and cool evenings are perfect for establishing cool-season flowers and veggies. Plus, trees and shrubs need less care and attention if you plant them in fall instead of spring. Although there are some heat-loving plants that prefer to start out with a long summer, the plants on this list find their sweet spot in autumn. Keep reading to find out what to plant in October.

Cool-season flowers
Purchase cool-season flowers from your local garden center in time for October planting. Or, start them from seeds in August or September. Apply a 2- to 3-inch layer of compost to amend garden beds prior to planting. For container garden setups, use a high-quality outdoor potting mix.
Pansies and violas
Pansies and violas are mound-shaped plants with emerald green foliage and colorful 1- to 2-inch flowers. They love the cold. Plant them in the fall for a colorful display as long as daytime temperatures stay above freezing. In the deep cold, they pause and resume as soon as the weather turns mild. Expect pansies and violas to remain in good condition until warm weather arrives in late spring or early summer.

Read more
The best sprays to keep pests off your delicate hibiscus plants
Safe and effective sprays for your hibiscus
Close-up of a red hibiscus flower

Garden pests range from minor annoyances to plant-destroying nightmares, but controlling them can be tricky. While commercial sprays are effective and easy to find, many of them include harsh chemicals that are not good for the environment. On top of that, some plants are too sensitive for sprays like that! Hibiscus plants in particular can suffer cosmetic damage from certain chemical sprays. If you need help keeping pests away from your hibiscus, here’s what you need to know about finding the right insecticide for hibiscus plants.

Why are specialized sprays so important?
Insecticide or pesticide sprays have a job to do. They’re made specifically to kill insects and keep them away from your plants. Most plants can withstand the chemicals used in these sprays without issue, but some plants, like hibiscus, are particularly sensitive.

Read more
9 low-maintenance outdoor potted plants your patio needs to be its brightest, most inviting self this summer
Add color to your patio with these low-maintenance potted plants
A patio with colorful potted plants surrounding a bench.

It's hard to resist the call of warm weather. Sitting outside on your patio with your friends or just a good book can be so relaxing, and adding your favorite flowers to the mix makes it even more so! Some bright colors and interesting plants could liven up this gathering spot, but what if your thumb isn't even remotely green? No problem. We've collected our 9 favorite low-maintenance outdoor potted plants for you to add to your patio. Whether you need sun-loving flowers, plants that prefer shade, or shrubs to fill the space, this guide to low-maintenance patio plants is sure to satisfy.

Have a patio that gets baked by the sun all day? Try these plants
Many of our favorite plants would wither up and die if exposed to the harsh sun all through the day. Here are some sun-loving beauties that thrive in full sun and are resistant to drought. 
Marigolds
Marigolds are one of the most popular flowering plants to place in pots on front porches or back decks. With their bright yellow and orange blooms, it's easy to see why! Not only are they gorgeous flowers, but they require almost effortless care. They prefer to dry out between waterings, and they love full sun. That means you can let them hang out in the sun and not worry about killing them if you miss a watering day.

Read more