The top 5 plants that repel ants, according to gardening pros

Wave goodbye to creepy crawlies by planting these flowers and herbs

Three pictures of plants that repel ants - a cluster of purple lavender, a close-up of a green basil plant, and a rosemary plant with purple flowers
(Image credit: Getty Images / Olivia Bell Photography / Sergio Amiti / Jasenka Arbanas)

If you've got lots of ants in your backyard, you don't have to resort to nasty chemicals in order to remove them. Instead, try planting greenery that will ward them off instead.

I've asked gardening pros for the ones they recommend adding to your yard, and they're all easy to bring in and maintain. From flowers like luscious lavender to herbs like beautiful basil, there are plenty of options to try.

If you're trying to get rid of ants in your backyard, I recommend getting your gardening gloves on and going for natural solutions such as these.

1. Basil

A birds eye shot of a dark green basil plant, with other leafy plants below it

(Image credit: Getty Images / Sergio Amiti)

This herb is a great choice for your backyard, as it will also provide a delicious fragrance as well as repelling ants.

“Basil strongly smells of oils like eugenol, which is a real turn-off for ants and other pests,” explains Matthew Wilson, gardener at Handy Gardeners.

He recommends planting this in rich, well-drained soil with full sun, as well as pinching off flowers to promote leaf growth and retain the repellency of the plant.

2. Mint

A birds eye shot of bright green mint leaf plants outdoors

(Image credit: Getty Images / mtreasure)

Mint is such a brilliant all-rounder, with it not only tasting wonderful in cool drinks but also repelling ants effectively.

“Ants avoid mint due to the barrier of the menthol oils found in the mint herb,” Matthew says. “The fast growth and the spreading form of this herb makes it a relatively good ground cover.”

If you don’t want it to do this, Matthew suggests growing it in containers to keep its growth under check. 

“I also advise regularly harvesting the leaves for use in cooking, which will help the plant stay in good health and in a potent stage of its life cycle,” he adds.

3. Lavender

A cluster of purple lavender plants with light green stems, with a light blue sky above

(Image credit: Getty Images / Olivia Bell Photography)

I have a lavender plant in my backyard where I’m also growing vegetables, so I’m thrilled that not only does it smell good, but it is also working to deter ants from my outdoor space.

Matthew explains, “Lavender, with its key ingredients or oils, such as linalool, produces a fragrance that repels ants while making your yard look good.

“Planting lavender around entry points like patios, decks, and foundations creates a barrier against ants,” adds Sal Musto, gardener and landscaping expert at SalCorp Landscaping & Construction.

Just make sure to prune it regularly even after it blooms, in order to allow it to maintain its form and strong scent.

4. Lemongrass

A cluster of green spiky lemongrass plants with dark soil underneath them and dark green bushes behind them

(Image credit: Getty Images / Photography by Jeremy Villasis)

For those who are trying to repel mosquitos from their backyards as well as ants, lemongrass is worth trying.

“Lemongrass contains citronella, which is a compound with ant-repellent properties. The essential oils from these plants can also be used to make natural ant spray by mixing a few drops with water in a spray bottle,” Sal explains.

“Apply the spray around doorways, windowsills, and any cracks or crevices where ants may enter,” he suggests.

If you’re keeping your spray bottle outside, it’s worth finding one made with a durable material such as glass, such as the LiBa Glass Spray Bottles from Walmart which are BPA-free.

5. Rosemary

A close-up shot of dark green spiky rosemary plants with light purple flowers growing on them

(Image credit: Getty Images / Jasenka Arbanas)

This is another aromatic herb that can be used to freshen up your backyard and enhance your cooking.

Matthew explains, “Rosemary's aromatic oils — camphor and cineole — repel ants while beautifying the garden itself with a great fragrance.”

He says to plant it in sandy, fast-draining soil in full sun, and to stay on top of pruning in order to keep it bushy and to allow it to release more oils.

Ant repellent essentials


To maximize the effectiveness of these ant-repellant plants, Sal suggests grouping several of them together.

“Adding these natural repellents along with good yard maintenance like removing food sources and sealing any entry points is the best approach to controlling ants,” he finishes by saying.

Dealing with ants up high as well as down low? Learning how to keep ants off your hummingbird feeder may also come in useful.

Eve Smallman
Content Editor

Hi there! I’m the former content editor at Real Homes and I'm now a freelance journalist.. I've been a lifestyle journalist for over five years, previously working as an editor across regional magazines. Before this, I graduated from Nottingham Trent University a degree in journalism, along with an NCTJ gold diploma. For Real Homes, I specialized in interior design, trends and finding the best viral buys.

Latest in Garden Pests
A garden with a border with mixed planting, shrubs, perennials and annuals, late flowers, changing leaf colors, and a green lawn
Flying ants vs. termites — the key differences between these winged pests
Three pictures of plants that repel ants - a cluster of purple lavender, a close-up of a green basil plant, and a rosemary plant with purple flowers
The top 5 plants that repel ants, according to gardening pros
I dealt with a vegetable crop aphid infestation. Here is my backyard - a light blue rectangular planter with spring onion crops in it, with a large orange cermaic planter and a purple watering can behind it
How I dealt with a vegetable crop aphid infestation — and 5 pro-approved tips I recommend following
Pink flowers in the backyard - for article on ways to keep pests out of your yard
Ingenious ways to keep pests out of your yard — 7 secrets to an ick-free outdoor space
Learning the plants that repel pests outdoors is a good idea. Here are three of these - purple lavender flowers in a field, a bunch of rosemary with light purple flowers, and orange, pink, and white mum flowers in a field
Plants that repel pests outdoors — 7 herbs and flowers that gardening and pest control pros love
Colorful garden in backyard with grass
How to get rid of ants in your backyard — 5 methods pest control pros use
Latest in Advice
A collection of purple and red flower pots on a wooden table in a backyard with grass
The outdoor plants you need to protect for winter, according to gardening experts
A white watering can with a gold handle and spout watering a green monstera plant
How often to water monstera, according to gardening pros
Three pictures of pothos plant care - one of a hand spritzing it, one close-up of the leaves, and one of a hand wiping it with a cloth
How to care for a pothos plant — 4 simple steps for stunning leaves
Purple indoor plant
Best purple indoor plants – 6 easy to grow beauties that will add some dark drama
A living room with a white brick walll, a fireplace with logs next to it, a wooden coffee table with books on it, and a brown leather armchair
How to do a fall reset — 5 easy steps that are approved by designers and cleaners
A collection of dark green monstera plants in front of a beige wall with a white door
How to propagate monstera — 5 easy steps for new leafy plants