Do Coffee Grounds Kill Ants? What Works Instead
Coffee grounds can divert a trail for an afternoon, but they do not kill a colony. Here is the evidence, plus the indoor ant plan that actually works.

Most people meet the coffee-grounds hack the same way: a line of ants crosses the kitchen, someone spoons grounds across the path, and by the afternoon the counter is clean. The part that gets skipped is the second question. Not “did the ants leave,” but “is the colony still there, and where is it going instead?”
The honest answer is that coffee grounds do not kill ants. They can interrupt a trail for a while, and some ants will steer around a fresh pile, but a scoop of spent grounds has no measured dose, no slow-acting active ingredient, and no delivery route into a nest. The reliable indoor sequence is much less exciting and much more effective: remove the food and the water, erase the trail, find and seal the entry point, and then use a labeled bait if the colony keeps sending workers. This guide covers what the research actually says, how to choose the right bait, and where the safety lines are.
This is a source-checked synthesis rather than a household trial. We did not run our own ant experiment; instead, every claim below is tied to a peer-reviewed paper, a university extension page, or a published first-hand test, and the strength of each one is stated plainly. For outdoor mounds and yard ants, our guide to getting rid of ant hills is the right page instead.
Written by Sai Ananth, lead content writer at LeafyPixels, with a B.Pharmacy background in pharmacognosy and a long habit of troubleshooting pests in real apartments. Reviewed by Dr. Emily Carter, Organic Gardening and Soil Health Specialist on the LeafyPixels Editorial Review Board, who checked the pesticide-safety wording, the IPM sequencing, and the soil-and-plant interactions in this page. One review rule shaped the whole guide: a claim only stays if a cited source actually states it, and claims the sources do not support were cut rather than softened.
The short answer: coffee grounds are not an ant treatment
Coffee grounds are a temporary behavioral nudge, not a treatment. A line of grounds can make a foraging route awkward to cross, and the workers you can see may turn around and go find another path. That is a real effect, and it is also why the method feels like it works. What it does not do is reach the colony.
What the hack actually does to a trail
Ant foraging runs on scent. When a scout ant finds something worth eating, it carries a piece back to the nest and leaves a chemical trail other workers follow. As UF/IFAS Extension explains in its ant guide, some ants leave scent trails made of pheromones that others follow to the food source, and that trail is typically short-lived and has to be reapplied continuously.
A barrier of grounds interrupts that trail without ending it. The colony is still producing scouts, the food is still there, and the pheromone is still being laid down. Workers reroute, and often the detour is quieter and easier for you to miss. What looks like “the grounds solved it” is usually “the ants moved.” The entry crack is still open, and the colony is still producing foragers.

Why the coffee hack looks like it works
Three things tend to happen in the same week, and the grounds usually get the credit. Grounds go exactly where the ants were most active, which is the one place a barrier can look effective. The food that attracted the ants is usually cleaned up at the same time, so two changes happen at once. And ant activity swings with heat and time of day, so some of the “improvement” is just the daily cycle.
There is a good published test that shows this. In his write-up on GardenMyths, gardener Kevin Lee covered a coffee-ringed ant nest with grounds and came back at noon to find the whole area quiet, including untreated nests nearby. By the afternoon the ants were back and moving again. The “success” was partly a break for the heat.
A physical obstacle, not a poison
Lee’s conclusion is the most useful sentence anyone has written on this subject: ants do not like coffee grounds, but the grounds do not create a major problem for them. They go around them, ignore them, or move them out of the way. His suspicion is that a coarse particle simply is a physical obstacle relative to a small ant, and that spilled liquid coffee did nothing at all, because the workers walked straight across it.
The same page reports an extension test that matters even more. Dr. Wizzie Brown, an entomologist at Texas AgriLife Extension, spread one cup of used coffee grounds over a fire ant mound and found no effect: the activity after applying the grounds was the same as on the control mounds that received nothing. Grounds were not lethal even to the most aggressive ant most people will meet in a yard.
Neither result is surprising once you think about what a treatment has to do. A colony-level product has to be carried home by foragers, shared with nestmates, and fed to the queen and the brood. Loose grounds do none of that, and they cannot.
What the research on coffee and ants actually shows
The research base here is small, mostly laboratory work, and mostly about coffee extracts rather than coffee grounds. Two distinctions do most of the work: what was tested, and what was not.
The 2018 coffee-extract study, fully cited
The study most often cited online is Yeoh, Dieng and Majid, Mortality and Repellent Effects of Coffee Extracts on the Workers of Three Household Ant Species, Pertanika Journal of Tropical Agricultural Science, volume 41, issue 4, pages 1557 to 1586, published in 2018. It tested extracts of three coffee species, Coffea arabica, Coffea canephora and Coffea liberica, impregnated into gel bait, against workers of three household ant species: the ghost ant (Tapinoma indicum), the big-headed ant (Pheidole megacephala) and the Pharaoh ant (Monomorium pharaonis).
The reported results are specific. Coffea arabica produced the highest mortality across the three ant species, and higher extract concentrations produced higher mortality in most bioassays. At the low concentration, the extract was not effective in killing the household ants, but it did repel them. So the study supports a real, narrow claim: concentrated coffee extract in gel bait can kill these ants, and dilute extract can repel them.
It does not support “a scoop of grounds in your kitchen will kill your ants.” Nothing in the work established an application rate for loose spent grounds, a barrier duration, or a way to get grounds to a queen.
Why a laboratory extract is not a kitchen recipe
Extracts are made by soaking or brewing plant material and concentrating it, so they deliver a defined amount of compound. Spent grounds are the leftover of a brew, and their chemistry varies with roast level, brew ratio, and how long they sat. A measured concentration in a laboratory gel bait and an unnamed spoonful of dry grounds on a counter are not comparable units of delivery.
The delivery mechanism is different too. Bait works because of what UF/IFAS Extension calls trophallaxis: workers pick up the bait as food, carry it back, and share it, which distributes the toxicant to the queen and brood. Grounds do not move through a colony; the ants move around them.
The same UF/IFAS page also explains why spraying the visible ants is not a substitute. Treatments that target individual trails are usually a quick fix and ineffective in the long term, because they do not reduce the ant population and do not affect the queen.
When caffeine attracts instead of repelling
There is a second layer to this that gets skipped, and it makes “coffee deters ants” a shaky rule rather than a rule at all. In a peer-reviewed study of invasive ant learning published in Current Zoology and available through PubMed Central, Galante and Czaczkes note that caffeine has been shown to act as an attractant or a repellent depending on the extracts and concentrations used, likely altering how the ants perceive food value. They cite the 2018 Pertanika coffee study among the sources for that point.
In their own laboratory work, 481 Argentine ants (Linepithema humile) were tested with seven neuroactive chemicals including caffeine, and caffeine produced no significant effect on spatial learning and no effect on short-term olfactory learning. The authors are careful about the limits of their own result, noting that concentration and time window can change the outcome and that the published literature is heavily biased toward bees.
The practical reading is straightforward and slightly uncomfortable: a coffee-scented barrier is not reliably aversive. At some concentrations, and for some species, coffee odor may be attractive. If you put a moat of grounds next to a crumb, you have not guaranteed that you are pushing the ants away from the crumb.
What to do instead: the indoor IPM sequence
The recommended approach for indoor ants is integrated pest management: exclusion, sanitation, and baiting, used in that order of importance. UC Integrated Pest Management’s ant guidance also makes the point that indoor sprays do not prevent additional ants from entering, so sealing the structure matters more than spraying the trail in front of you.
If you want the short version of the whole plan before the detail: how to get rid of ants in the house walks through the same sequence with more room for each step.
Step one: remove the food and the water
Ants are after two things, and most of them are available in a kitchen. Food means sugar, grease, crumbs, syrup, juice, and pet food. Water means the sink edge, a damp sponge, a slow drip under the cabinet, and a bath mat that never dries out. Clear both and a surprising number of trails stop on their own, because the colony never got a reason to send more foragers.
Colorado State University Extension puts the payoff plainly: removing sources of food and water reduces visitation by ants and makes baits used for ant control more effective. That second half matters, because a bait competing with a crumb in the trash is a bait that may never get carried home.
UF/IFAS also notes that ants need water and that workers can carry water back to the colony in their guts, so a reliable drip can keep a trail alive after the food is gone. Fixing the drip is more useful than masking it with a smell. The same page puts cleanliness first in indoor ant control and asks you to reduce moisture sources, including condensation and leaks, which is why a damp corner can hold a trail together long after the crumbs are gone.
Look outside as well. Some ants follow honeydew from aphids, mealybugs, and scale rather than your leftovers, and UF/IFAS notes that sweet-feeding species tend these sap-sucking insects. If the trail ends at a shrub, the fix is on the plant, not in the pantry. Our guide to ants living in houseplant pots covers that version.
Step two: trace the trail to its entry point
Watch for a few minutes before you clean anything. A single scout wandering through is exploration. A steady line of workers moving in both directions is a road, and roads have two ends. Follow it with a flashlight, and do not crush every ant on the way, because you are trying to see where they go.
The usual suspects are gaps under doors, window frames, the joint where a counter meets the wall, plumbing penetrations, cabinet seams, electrical entries, and the crack where a foundation meets siding. Purdue Extension’s ant bulletin lists the same set, adding built-in cabinets, refrigerators and other heavy appliances as favorite hiding and entry points, and notes that homes on concrete slabs are a special case, since the insects nest under the slab and come in through cracks, heating ducts and utility openings.
Two things about the trail itself change your plan. UF/IFAS warns that ants often nest in walls, behind baseboards, or under the house, and that a trail may enter through a crack while the actual nest is some distance away. And the species matters: Colorado State notes that the ants found indoors are most often foragers living outdoors, except in the case of species such as the Pharaoh ant, which is minute at roughly one twelfth of an inch, nests inside buildings, and may split into satellite colonies.
If the ants are large, working on damp wood, and there is a pile of coarse sawdust-like material under a beam or window, treat that as a carpenter ant question rather than a coffee question. Purdue describes their signature as a small pile of coarse sawdust beneath the nesting site, usually in wood with above-normal moisture, and notes that carpenter ants hollow out wood rather than eating it. Our carpenter ant control guide covers the non-pesticide route. And if what you are seeing is winged, check the body shape before you spray: our ants versus termites comparison is the fastest way to rule out termites.
Step three: erase the trail, then seal the gap
Start by removing the trail itself, because a pheromone road is an invitation. Vacuum the line, then wipe the surface and the entry area with soapy water. Colorado State recommends washing down counters or floors with household cleaner to eliminate the odor trails ants have established. The goal is a neutral, clean surface so you can tell whether the trail is coming back.
Then close the route. UF/IFAS notes that sealing cracks and holes where ants enter a structure can effectively stop most invasions, and that caulk or another exclusion device can block the entry. Order matters, though. If you seal the crack while the colony is still actively foraging, the workers may simply emerge somewhere harder to find, and species that bud, such as Pharaoh ants, are good at scattering when they are disturbed. Seal after you have set the bait, and keep watching for a new line somewhere else, because a moving trail means the colony is still active.
In a rental, an apartment, or a shared building, document the route before you start and tell the property manager if the trail appears to come from a wall, a ceiling, or a neighboring unit. Sealing one visible crack will not solve a connected infestation, and Colorado State notes that Pharaoh ant colonies can split and scatter in response to disturbances, including the use of some insecticides, so repeated spraying can move a colony instead of ending it.
Baiting the colony: match the bait to the ant
If ants return after the food, the water, and the entry point are handled, the next question is whether you need colony-level control. If you do, a labeled bait is the tool that fits the biology, and it is worth understanding why before you buy anything.
Workers pick up bait as food, carry it home, and share it with nestmates, so the toxicant reaches the queen and the brood, including ants you never see. NC State Extension’s baiting guide makes three points that decide most cases: bait works even when the nest cannot be found, it poses less risk to children and pets than a sprayed surface treatment, and it can kill the entire colony while most surface sprays kill only the workers that touch them. UF/IFAS says the same thing from the other direction, calling baits the most effective way to get toxicant into the nest.
If coffee grounds are going anywhere near a bait station, the answer is no. Grounds are not a labeled product, they add no active ingredient, and a scent barrier near a bait can push workers away from the placement instead of toward it. The Spruce’s expert-backed DIY ant trap guide is a reasonable read on homemade mixes, and it is worth knowing that boric acid and borax are real pesticide active ingredients with real cautions, not a free solution.
Sweet, protein and grease baits side by side
Ants are not a single appetite. Preferences differ by species and shift through the season as the colony’s brood load changes, and UF/IFAS notes that switching from sugar-based baits to protein or oil-based baits can be what keeps a colony interested.
| Bait base | Ants most likely to take it | What to watch |
|---|---|---|
| Sugar, in gel or liquid | Field ants, odorous house ants, Pharaoh ants, and other sugar-feeding foragers | Some ants prefer sweet food and tend honeydew-producing insects such as aphids and scale, so a trail that runs to a plant needs the plant treated, not the pantry |
| Protein | Fire ants and crazy ants, which UF/IFAS lists as taking sugars, protein and insects | If a sugar bait is being ignored, a protein bait is the next move rather than more of the same |
| Grease and oil | Pavement ants, which Colorado State lists as favoring greasy materials | Grease baits dry out faster and go stale; replace them on a schedule |
| Liquid or gel sugar bait | Carpenter ants, which Colorado State notes will not visit most solid baits but will feed at some liquid or gel sugar baits | Large ants with sawdust frass need a different response than a small ant trail; check for a nest before assuming bait is enough |
NC State gives the fastest field test for all of this: place a small amount of bait where you see ants foraging, then watch their reaction for a few minutes. If the ants show no interest, try a different bait until you find one they will readily eat. The Spruce makes the same point in practical terms, noting that a boric acid and sugar water trap works well for small sugar-loving ants such as the odorous house ant and is ineffective against species like the carpenter ant.
Placement, timing and switching baits
Put the bait where the ants already are. NC State advises placing it in known or suspected areas of ant activity, never on countertops where food is prepared, never where it will get wet or contaminated, and out of the reach of children, pets and wildlife. UF/IFAS adds that bait goes next to nests whenever possible, and that the plan works best when it does not compete with other food sources in or around the building. In practice that means wiping the counters near the station, not just the trail.
Then give it time. Purdue’s bulletin says ant baits may require ten days or more to produce the desired effects. NC State tells you to expect to still see ants for a week or more, because the workers have to be able to get the bait back to the nest. Colorado State says effects usually become apparent within a week or two. UC IPM frames the range most usefully: with some bait programs you may see fewer ants after about five to ten days, while complete control can take several weeks or more depending on the species, the product, the weather, and how much competing food is available.
Keep the bait fresh. NC State lists quantity and durability among the factors that decide whether a bait works, and Colorado State and UF/IFAS both advise replacing bait that dries out or is consumed. A station that has been sitting untouched for two weeks is not a working station.
And do not spray near it. NC State is blunt: do not disturb or kill the ants with insect sprays or other means, because spraying the ants or the baited area contaminates the bait and other ants will avoid it. Colorado State says the same about contact sprays in the vicinity of a bait station. If you need immediate cosmetic relief, vacuum the trail and wipe it with soapy water rather than fogging a food-preparation surface.
Safety: pets, children, plants and labels
Coffee grounds are often presented as the safe, natural option, which is exactly why the caffeine question matters. Pet Poison Helpline notes that dogs and cats are more sensitive to caffeine than people are, that one or two licks of coffee is unlikely to poison most pets, but that ingestion of unused coffee grounds or beans can cause serious toxicity, with signs including hyperactivity, gastrointestinal upset, changes in heart rate, rhythm and blood pressure, and neurological signs such as tremors and seizures. If a pet gets into grounds, call a veterinarian or Pet Poison Helpline rather than waiting to see what happens. If you are choosing a method, do not choose coffee grounds on the assumption that they are pet-proof.
Bait has its own rules. NC State notes that baits pose less risk to children and pets than surface sprays because contact is limited, and Colorado State is equally direct about homemade mixtures: if you make them, they must be applied where pets or children cannot reach them, and a sealed container with punched entry holes makes a more protected station. The Spruce adds that borax and boric acid are low in toxicity but that children and small animals are more susceptible to poisoning than adults, so the station belongs somewhere out of reach. If you want the labeled options instead of a kitchen experiment, our guide to getting rid of ants cheaply and naturally and our borax and ant bait explainer walk through both routes.
Plants get their own warning. Colorado State notes that baits containing boric acid or borax cannot be applied directly to soil where plants are growing, because boron-containing materials can act as soil sterilants. That matters for anyone who was about to sprinkle a borax mix around a potted plant; our guide to stopping ants nesting in plant pots is the safer reference for that situation. Diatomaceous earth is a common alternative, and it has its own limits indoors, which that guide covers.
Finally, read the label, every time. Purdue’s bulletin puts the legal standard in plain language: read and follow all label instructions, including directions for use, precautionary statements, rates of application, number of applications, reentry intervals, storage and disposal. Indoor kitchen use, outdoor foundation use, and use near edible crops are not interchangeable permissions, and a product is not made safe by a household name. Keep the package and the active-ingredient information, do not transfer bait into an unlabeled jar, and never combine products unless the label allows it.
When indoor ants need a professional
Call a qualified pest professional when ants persist after you have removed the food and water, cleaned the trails, checked the entry points, and used a labeled bait as directed. Some situations warrant a call sooner. Purdue notes that professional pest control may be needed in slab-built homes where the colony nests under the slab and enters through utilities, and in the case of carpenter ants. UF/IFAS flags indoor nesting in walls and behind baseboards, and Colorado State notes that Pharaoh ant colonies move locations frequently and split into satellite colonies, which is a genuinely hard problem for a homeowner.
Treat suspected fire ant or stinging ant activity as a safety issue rather than a kitchen project. Keep children and pets away, do not kick or dig at the mound, and get local identification and label guidance before doing anything. Our fire ant guide covers the identification details.
Ask for an inspection and an integrated plan rather than an automatic spray-only visit. A good plan identifies likely entry and nesting areas, distinguishes carpenter ants or stinging species from ordinary foragers, explains which product is being used and where, and addresses the moisture or structural conditions that let the problem come back. If you are in a shared building, a professional can also tell you whether the infestation is connected across units, which no amount of local cleaning will fix.
Related guides
- How to get rid of ants in the house — the full indoor removal sequence, with more detail on each step
- How to get rid of ant hills — the outdoor version, for mounds in lawns and garden beds
- Does diatomaceous earth kill ants? — what this alternative does indoors, and where it falls short
- Does borax kill ants? — how borax and boric acid baits work, and the mixing caveats
- Getting rid of ghost ants — one of the three species in the coffee-extract study, and a hard indoor problem
- Control carpenter ants without pesticides — moisture, wood, and exclusion for the big ants
- Ants versus termites — telling winged ants apart before you treat them
- Integrated pest management indoors — the full framework this guide applies
- Ants on houseplants — when the trail ends at a pot instead of a pantry
Conclusion
Coffee grounds do not kill ants. They can interrupt a trail for hours, and there is a real chance some workers will avoid a fresh pile, but a scoop of spent grounds has no measured dose, no slow active ingredient, and no way to reach a queen. The best available research on coffee and ants, the 2018 Pertanika study of concentrated extracts in gel bait, supports a narrow claim and nothing wider. The first-hand garden tests point the same way: ants walk around grounds, push them aside, and come back.
So treat the grounds as what they are, a minor obstacle, and put your effort where the colony is. Remove the food and the water, erase the trail with soapy water, follow the trail to its entry point, seal the gap after the bait is placed, and use a labeled slow-acting bait matched to what that species will actually eat. Expect weeks, not days, and keep the sprays away from the bait. If the ants are in the wall, under a slab, or they are carpenter ants, get a professional involved. And if a dog decides your grounds are a snack, call a veterinarian rather than the internet.



