Coffee grounds do not kill cockroaches, and there is no good evidence they repel them either. The one published experiment that tested coffee grounds as a cockroach repellent found no statistically significant effect of dose or exposure time. Caffeine is a genuine natural insecticide in the right context, and a 1984 Science paper documented that it inhibits feeding and kills several insects, but cockroaches were not among the insects tested and spent grounds are far too dilute in caffeine to match those doses. Scattering damp organic matter around a kitchen also works directly against the thing that does clear a roach problem, which is removing food and water and getting bait eaten.
The earlier version of this article said "the smell and caffeine act as deterrents, encouraging roaches to seek food and shelter elsewhere," and suggested coffee-ground barriers around doors and foundations. We could not find research behind any of that. What follows is what has actually been measured.
The Only Published Test of Coffee Grounds on Cockroaches
Researchers at the Aceh Health Polytechnic in Indonesia ran a small laboratory experiment in 2019 and published it in the International Journal of Science and Healthcare Research. They used a two-chamber box separated by a divider, put coffee grounds and bread in one side, released ten American cockroaches into the other, and counted how many stayed away over an hour. They repeated it three times each at 10, 15, and 20 grams of grounds.
The results went nowhere. A two-way ANOVA found no significant difference by dose (p = 0.074) or by duration (p = 0.539). The authors' own conclusion was that there was "no effect" of the doses tested on cockroach repellency, and they recommended future work with a wider dose range.
This is a small, weakly controlled study in a low-profile journal, so it cannot prove coffee grounds do nothing. It is also the only direct test we could find, and it came back negative. That is the whole published evidence base for a remedy repeated on thousands of pages.
Caffeine Is a Real Insecticide, at Doses You Cannot Reach
The reason the coffee idea sounds plausible is that it has a real scientific ancestor. In 1984, James Nathanson published a paper in Science titled "Caffeine and Related Methylxanthines: Possible Naturally Occurring Pesticides." He showed that caffeine and related compounds inhibit insect feeding and can kill, by blocking the enzyme phosphodiesterase and driving up cyclic AMP inside nerve cells.
The details matter:
- Nathanson raised tobacco hornworm larvae on medium containing powdered coffee beans at 0.3% to 10% by weight. Feeding dropped in a dose-dependent way, with hyperactivity, tremors, and stunted growth. Above 10% coffee, the larvae died.
- He reported that caffeine at the concentrations naturally found in undried tea leaves (0.68% to 2.1%) or coffee beans (0.8% to 1.8%) was enough to kill most hornworm larvae.
- Feeding inhibition showed up in mealworm larvae, painted lady butterfly larvae, and milkweed bug nymphs at effective doses of roughly 0.1% to 0.3%.
- Adult flour beetles were not killed even by methylxanthine doses up to 3%, though reproduction was inhibited.
Cockroaches were not in the study. Neither were any other large omnivorous insects that would encounter caffeine as one item on a varied menu rather than as their entire food supply.
Now the dilution problem. A 2025 analysis in Foods measured caffeine in Costa Rican spent coffee grounds at 0.55 to 3.42 milligrams per gram of dry weight, which is 0.055% to 0.34% by weight. Brewing pulls most of the caffeine out, because caffeine is water soluble. So used grounds sit at or below the feeding inhibition threshold Nathanson found for caterpillars, and an order of magnitude below the levels that killed them. A roach would have to eat grounds as a large share of its diet for weeks, and nothing suggests it would.
Coffee Grounds Are Food, Not a Barrier
This is the part the "sprinkle a perimeter" advice gets backwards. German cockroaches are omnivores. UF/IFAS Extension describes them eating table scraps, pet food, and even book bindings. Spent coffee grounds are moist, organic, faintly sweet-smelling plant matter. For a scavenger, that is a resource, not a wall.
There is also the moisture. Roaches need water more urgently than food, and the EPA's pest control guidance emphasizes eliminating sources of both, including fixing leaking pipes and faucets. Damp grounds under a sink or along a baseboard add a small wet organic deposit exactly where you are trying to create a dry, bare surface.
If you want to understand what a roach is actually scavenging for, see what roaches eat and what attracts roaches and how to remove it.
Why This Can Make Bait Work Worse
Baiting is the tool that actually reduces a German cockroach population, and its weak point is competition. NC State Extension states the requirement directly: "For effective control, cockroaches must prefer to eat the bait product over surrounding, non-toxic foods."
Every extra food source in the kitchen is a competitor to your bait. That includes dishes in the sink, pet food left out overnight, grease behind the range, and yes, a handful of coffee grounds behind the trash can. If you are baiting and also spreading organic matter, you are working against yourself. Signs to watch for are covered in how to tell if roach bait is working.
What About the Coffee Grounds and Jar Trap?
The classic version is a glass jar with coffee grounds and a little water in the bottom, sometimes with petroleum jelly smeared inside the rim. People report catching roaches in it.
That can work, but the mechanism is mechanical, not chemical. Roaches climb into a container attracted by food odor and moisture, then cannot get back up a smooth vertical glass wall. Any food would do the same job. What the jar tells you is where roaches are active, and for that purpose a flat sticky trap is cheaper, easier to place in a tight space, and easier to read. UF/IFAS calls sticky traps your "eyes" in the property, working 24/7.
If you want to try the jar anyway, trapping roaches in a jar covers the setup. Treat it as monitoring, not control. A jar catching five roaches a night in a home with hundreds is not progress.
What To Do Instead
- Monitor before you treat. Place unbaited sticky traps under the sink, behind and beneath the refrigerator, beside the dishwasher, and in the back corners of lower cabinets. Date them. A week of trap counts tells you where the population lives.
- Take away the competing food. Wash dishes before bed, degrease the stovetop and the sides of appliances, store dry goods and pet food in hard sealed containers, pick up pet bowls at night, and keep trash covered.
- Dry the place out. Fix drips, wipe condensation, and keep the cabinet under the sink dry.
- Cut down harborage. Purdue Extension notes cockroaches hide in dark, narrow cracks and crevices and travel along edges. Caulk gaps, remove cardboard and paper clutter, and open up access to the places you need to treat.
- Apply gel bait properly. Small pea-size placements at multiple points near cracks and travel routes, close to where the traps showed activity. Follow the product label for placement and for any food-surface restrictions.
- Wait, then reassess. NC State notes baits may take a couple of weeks to reduce numbers substantially. UF/IFAS advises rotating baits with active ingredients from different IRAC classes to limit resistance and bait aversion.
If you would rather use a dry powder than a gel, the one with real published data behind it is silica or diatomaceous earth, and it has its own rules about thin application and keeping it dry. See how to use diatomaceous earth for roaches.
What Not To Do
- Don't build coffee-ground perimeters indoors or outdoors. There is no evidence of a repellent effect, and outdoors the grounds wash away with the first rain or sprinkler cycle.
- Don't mix coffee grounds with baking soda and call it a treatment. Baking soda has no established insecticidal mechanism against cockroaches either, and combining two untested remedies does not produce a tested one.
- Don't set off a fogger. UC IPM advises avoiding foggers, bombs, and aerosol sprays, noting they "may repel and disperse cockroaches to other areas without actually killing them."
- Don't spray repellent products near bait. UF/IFAS warns that a repellent treatment where bait is applied "will contaminate the bait, making it repellent, and cockroaches will not consume it."
Safety and Cleanup Notes
- Caffeine is toxic to dogs and cats. Pet Poison Helpline says dogs and cats "appear to be more sensitive to the effects of caffeine than people," and that ingesting unused coffee grounds, beans, or tea bags "could cause serious toxicity." Used grounds contain less caffeine but still measurable amounts. Do not leave piles where a dog can reach them, and call your veterinarian, the Pet Poison Helpline at 1-800-213-6680, or the ASPCA Animal Poison Control Center at 1-888-426-4435 if your pet eats any.
- Damp grounds mold. Wet coffee grounds left in a dark cabinet grow mold within days. That is a new problem, not a solution to the old one.
- Cockroach allergens are a health issue. EPA lists cockroach droppings and body parts among indoor biological contaminants that cause allergic reactions and trigger asthma. If someone in the home has asthma that flares indoors, treat the infestation promptly and talk to their clinician.
- Read the pesticide label. Whatever product you use, the label governs where it can go, how much, and what precautions apply around children, pets, and food surfaces.
When To Call a Professional
Call a licensed pest control professional if:
- You see roaches during daylight hours or in multiple rooms.
- Sticky trap counts have not dropped after two to four weeks of consistent sanitation and bait.
- Roaches are walking past more than one bait product.
- You are in an apartment or multi-unit building, where roaches move between units and unit-by-unit treatment usually fails.
- Anyone in the household has asthma or a significant allergy.
Ask whether the company monitors with traps, uses bait rather than broadcast spraying, and rotates active ingredients between visits.
Frequently Asked Questions
Do coffee grounds kill roaches?
No. There is no published evidence of contact or ingestion toxicity to cockroaches from coffee grounds. Caffeine has documented insecticidal effects on caterpillars and some other insects at percent-level doses in their diet, but cockroaches have not been tested and spent grounds contain roughly 0.05% to 0.34% caffeine.
Do coffee grounds repel roaches?
The only direct test we found, a 2020 laboratory study using American cockroaches, found no statistically significant repellent effect at 10, 15, or 20 grams. Its design was limited, but nothing else in the literature supports the claim.
Are fresh grounds stronger than used grounds?
Fresh grounds hold more caffeine, since brewing extracts most of it into the cup. That does not change the conclusion, and unused grounds are the form Pet Poison Helpline flags as most dangerous to dogs and cats. Neither form is a cockroach treatment.
Will coffee grounds attract roaches instead?
They can. Coffee grounds are organic matter with odor and moisture, and German cockroaches are generalist scavengers. At minimum, grounds act as a competing food source against your bait.
Does the coffee grounds and water jar trap work?
It can catch some roaches, but by physics rather than chemistry. Insects climb in for food and moisture and cannot climb back out of smooth glass. Sticky traps do the same monitoring job more reliably and fit in tighter spaces.
Can I put used coffee grounds outside to keep roaches out of the yard?
There is no evidence it helps, and rain washes it away. Outdoor roach pressure responds better to removing leaf litter and mulch against the foundation, fixing drainage, sealing gaps around pipes and doors, and cleaning around trash cans.
What actually gets rid of roaches fastest?
A combination: sanitation that removes competing food and water, physical exclusion and clutter removal, monitoring with sticky traps so you treat the right places, and gel bait applied according to its label. Extension services are consistent that baits outperform sprays for German cockroaches, and that pesticides alone will not solve the problem.
Sources
- Fajriansyah, Zubir, and Zulfikar, *International Journal of Science and Healthcare Research* (2020) — laboratory test of coffee grounds as a repellent against Periplaneta americana, with non-significant results.
- Nathanson, *Science* (1984) — caffeine and related methylxanthines as naturally occurring pesticides, the species tested, and the dietary concentrations required.
- Navarro-Hoyos et al., *Foods* (2025) — measured caffeine content of spent coffee grounds, 0.55 to 3.42 mg per gram dry weight.
- UF/IFAS Extension: German cockroach profile — omnivorous diet, including table scraps, pet food, and book bindings.
- UF/IFAS Extension: Assessment-Based Pest Management of German Cockroaches — sticky trap monitoring, repellent contamination of bait, and rotating IRAC classes.
- NC State Extension: The German cockroach, biology and control — bait must be preferred over surrounding non-toxic foods; expected timelines.
- UC IPM: Cockroaches — sanitation and exclusion first, baits over sprays, and the warning against foggers and aerosols.
- Purdue Extension: A Practical Guide to Cockroach Control in Multi-Family Housing Units — harborage behavior, sanitation, and bait placement.
- EPA: Pest Control Resources for Housing Managers — integrated pest management and eliminating food and water sources.
- EPA: Biological Contaminants and Indoor Air Quality — cockroach allergens as an asthma and allergy trigger.
- Pet Poison Helpline: Caffeine — caffeine toxicity in dogs and cats, including coffee grounds and beans.


