The most effective ant deterrents combine two strategies: removing what attracts ants in the first place and creating barriers they won’t cross. No single method works perfectly on its own, but sealing entry points, eliminating food and moisture sources, and using targeted repellents or baits can stop an ant problem and prevent it from returning.
Seal the Gaps Ants Use to Get Inside
Ants exploit surprisingly small openings. Cracks around windows, gaps under doors, and holes where pipes and wires enter your foundation are the most common entry points. Sealing these is the single most lasting thing you can do.
Start with door sweeps or thresholds on all exterior doors, and run a bead of caulk along the bottom outside edge and sides of each threshold. For sliding glass doors, line the bottom track with half-inch to three-quarter-inch foam weatherstripping. Gaps around outdoor faucets, dryer vents, gas meters, and cable lines should be plugged with silicone caulk, expandable foam, or copper mesh. Acrylic latex caulk works well for cracks around windows and fascia boards because it’s paintable and cleans up with water. Before applying new caulk, scrape away any peeling old material so the seal actually holds.
Garage doors need a rubber bottom seal rather than vinyl, which stiffens and gaps in cold weather.
Cut Off Food and Moisture
Ants send scouts to find food, then lay chemical trails so the rest of the colony can follow. Even a thin film of juice on a countertop or a few crumbs under a toaster is enough to trigger a trail. Wipe down kitchen surfaces daily, store sugar, honey, and pet food in sealed containers, and take trash out before it sits overnight. Rinse recyclables, especially soda cans and jam jars.
Moisture matters just as much as food. Leaky pipes under sinks, condensation on windows, and standing water in plant saucers all attract ants looking for a water source. Fix drips promptly, ventilate bathrooms, and avoid overwatering houseplants. Carpenter ants in particular seek out water-damaged wood for nesting, so persistent moisture problems can escalate from a nuisance trail to structural damage.
Essential Oils That Actually Work
USDA research tested several essential oils against Argentine ants and red imported fire ants and found that basil, citronella, lemon, peppermint, and tea tree oil all acted as effective barriers. Ants crossed treated surfaces significantly less often than untreated ones. Eucalyptus oil, despite its strong scent, did not deter either species at any concentration tested.
Citronella stood out as the most potent. In continuous exposure tests, it killed 50% of Argentine ants in about 34 minutes and achieved 100% mortality within 24 hours. Peppermint and tea tree oil were also lethal at high exposure, killing roughly 90% and 86% of Argentine ants respectively over 24 hours.
The practical limitation is that essential oils evaporate. You’ll need to reapply them every day or two, especially near windows or in warm areas. A few drops on cotton balls placed along baseboards or inside cabinets is a common approach. Mixing 10 to 15 drops into a spray bottle of water creates a surface spray for countertops and entry points, though it won’t last as long as undiluted oil on cotton.
A Warning for Pet Owners
Several of the oils that repel ants are toxic to cats and dogs. Peppermint oil, tea tree oil, citrus oil, eucalyptus oil, and pine oil are all known to cause poisoning in cats. Dogs are sensitive to pine, eucalyptus, and tea tree oil as well. If you have pets, basil oil is the safest choice among the proven repellents, or skip essential oils entirely and use physical barriers instead.
Why Vinegar Doesn’t Work Well
Vinegar is one of the most commonly recommended home remedies, but research on fire ants found it was completely ignored when applied to pheromone trails. Lemon juice performed only slightly better, distracting ants for roughly 30 seconds before they resumed their path. Both liquids evaporate quickly, especially in small amounts or sunlight, which likely explains why they fail. A quick wipe with vinegar might remove a visible trail temporarily, but it won’t prevent ants from re-establishing it within minutes.
Diatomaceous Earth as a Physical Barrier
Food-grade diatomaceous earth is a powder made from fossilized algae. Under a microscope, its particles have sharp edges that cut through the waxy coating on an ant’s exoskeleton, causing the ant to lose moisture and die from dehydration. It contains no chemical pesticides.
Apply a thin, even layer along ant trails, doorways, windowsills, and any cracks where ants enter. A heavy pile doesn’t work better; ants will simply walk around it. The key limitation is moisture. Diatomaceous earth stops working when it gets wet and needs to be reapplied after rain, mopping, or any water exposure. This makes it best suited for dry indoor areas like baseboards, behind appliances, and inside cabinets rather than bathrooms or outdoor thresholds.
Boric Acid Baits for Colony Elimination
Deterrents push ants away from a specific spot, but they don’t solve the underlying problem: a colony that keeps sending new foragers. Boric acid baits take a different approach. Worker ants carry the bait back to the nest, where it gradually poisons the colony from within, including the queen.
The University of Hawaiʻi recommends a simple recipe: dissolve 1 teaspoon of boric acid powder and 3 tablespoons of white sugar in warm distilled or bottled water, filled to the 1¾ cup line. Soak cotton balls in the solution and place them in small containers near active ant trails. Replace moldy or dried-out bait weekly, and allow ants to feed for up to one or two months for full colony elimination.
Two rules make or break this strategy. First, don’t remove the food source that’s currently attracting the ants until they’ve started feeding on your bait. If you clean everything up immediately, the ants may not discover the bait at all. Second, never spray insecticide near bait stations. Killing the foragers on contact defeats the purpose, because dead ants can’t carry poison back to the nest.
The EPA classifies boric acid as low in acute toxicity, but it’s not harmless. Lethal doses for children have been estimated at 3 to 6 grams, and less than 5 grams for infants. Keep bait stations in locations children and pets cannot reach, such as behind refrigerators, inside closed cabinets, or under heavy furniture.
Carpenter Ants Need a Different Approach
Most house-invading ants are small species, around an eighth of an inch long, that come indoors looking for sugar or grease. Odorous house ants are the most common. They’re dark brown to black, nest in shallow soil or wall voids near heat sources, and release a strong smell when crushed.
Carpenter ants are a different problem. At a quarter to five-eighths of an inch long, they’re noticeably bigger, and they’re black, red, or a mix of both. They don’t eat wood, but they excavate it to build nests, leaving behind small piles of sawdust-like shavings. They prefer water-damaged wood but will also nest in dry wood, insulation, crawl spaces, and attics. Sugar baits alone are less effective for carpenter ants because their diet is more varied, and the real fix involves locating and removing the nest or the moisture-damaged wood they’ve colonized.
If you’re finding large ants indoors along with fine wood shavings, you likely have carpenter ants and should prioritize finding and fixing the moisture source that attracted them. Boric acid products, fipronil, and imidacloprid are listed as effective treatments for carpenter ants, but colony nests hidden inside walls or structural wood often require professional treatment to fully resolve.