Do Coffee Grounds Attract or Repel Cockroaches?

Coffee grounds themselves don’t attract cockroaches, but the moisture and warmth that come with them absolutely can. Cockroaches are drawn to damp, warm environments with organic material, and a pile of wet, used coffee grounds checks those boxes. The coffee itself, though, is a different story: caffeine and the natural acidity in coffee grounds can actually be harmful to roaches.

What Actually Draws Roaches to Your Coffee Setup

Cockroaches aren’t seeking out coffee the way they seek out sugar or grease. What pulls them in are the conditions coffee creates. Used grounds hold moisture for days, soggy filters sit in trash cans, and leftover water pools inside brewing machines. That combination of dampness and decaying organic matter is exactly what roaches look for when scouting a food and water source.

Warmth plays a role too. The area under and behind a coffee maker retains heat, especially if the machine stays plugged in or was recently used. Cockroaches are drawn to warm, sheltered spots, and a kitchen counter near a coffee station fits the profile. The strong aroma of coffee can also signal a potential food source to roaches, even though coffee itself isn’t what they want. What really seals the deal are the extras: sugar bowls, cream, flavored syrups, and crumbs that tend to accumulate near where you make your morning cup.

Caffeine Is Toxic to Cockroaches

Here’s the twist. Caffeine is not friendly to cockroach biology. Research at Vanderbilt University used American cockroaches to study caffeine’s effects on their nervous system and found that caffeine disrupted their ability to learn and navigate. Roaches injected with caffeine performed significantly worse than a control group on spatial tasks, showing no improvement across trials while untreated roaches clearly learned over time. The acidity in coffee grounds adds another layer of deterrent.

This means coffee grounds occupy an odd middle ground. The grounds themselves contain compounds that are harmful to roaches, but when those grounds are wet and decomposing in your trash or compost bin, the moisture and smell can still lure them in.

Coffee Grounds as a Cockroach Trap

Because roaches are attracted to the moisture and scent of used grounds but can’t tolerate caffeine well, some people use coffee grounds as bait in simple homemade traps. The method is straightforward: place about a quarter cup of moist, used coffee grounds in the bottom of a glass jar (it has to be glass, since roaches can’t climb the smooth interior walls). Prop the jar at an angle against a wall so roaches can crawl up and drop in. They enter the jar but can’t escape.

The results can be surprisingly effective. One documented case involved a compost bin area with a growing roach population. The first night the trap was set, it caught 75 cockroaches. The second night, 25. By the third night, just 12. The trap works because it exploits exactly what makes coffee grounds appealing to roaches (moisture, scent, organic decay) while using the glass surface to prevent escape. It won’t eliminate a serious infestation on its own, but it can make a noticeable dent in a localized population.

How to Keep Coffee Grounds From Becoming a Problem

If you’re worried about your coffee habit inviting roaches, the fix is managing moisture rather than giving up coffee. A few practical changes make a real difference:

  • Empty grounds promptly. Don’t let used grounds sit in the machine or filter basket overnight. That warm, damp environment is prime roach territory.
  • Dry grounds before disposal. If you’re tossing grounds in the trash, spread them on a paper towel for a few minutes first. Dry grounds are far less attractive than soggy ones.
  • Clean the drip tray and reservoir. Standing water in or around your coffee maker is one of the biggest draws for roaches. Wipe it dry after use.
  • Store sugar and cream sealed. The sweeteners and dairy products near your coffee station are a bigger lure than the coffee itself. Keep them in airtight containers.
  • Take out the trash. A kitchen trash bag with wet coffee grounds, food scraps, and warmth is a cockroach buffet. Empty it regularly, especially at night when roaches are most active.

Fresh Grounds vs. Used Grounds

There’s a meaningful difference between fresh, dry coffee grounds and the wet, spent kind. Fresh grounds are drier, more acidic, and higher in caffeine, all of which make them less appealing and more harmful to roaches. Some people even sprinkle dry coffee grounds around entry points as a mild deterrent, though the evidence for this as a reliable repellent is anecdotal at best.

Used grounds are the ones that cause problems. Once coffee has been brewed, the grounds lose some of their caffeine and acidity but gain a lot of moisture. As they sit and start to break down, they become part of the damp, organic-rich environment cockroaches actively seek. The distinction matters if you’re composting, gardening with coffee grounds, or just leaving them in a bin near your kitchen. Keep used grounds sealed or dry them out, and they go from cockroach magnet back to neutral.