Garden Myths - Learn the truth about gardening

How To Get Rid of Ants With Coffee Grounds

How do you get rid of ants? I have found that people use 3 common home remedies to get rid of ants; diatomaceous earth, Borax and coffee grounds. Borax does work and it is the main ingredient in many commercial products designed to get rid of ants. In this post I will look at the effectiveness of coffee grounds.

Getting Rid of Ants with Coffee Grounds

Getting Rid of Ants with Coffee Grounds

Why get rid of Ants?

Before I get into the main topic I would like to make a comment about ants. They are very good for the garden since they improve soil structure. Sometimes they build their nest right under a precious plant and that may cause a problem–but they rarely harm a plant. Ants are predators and eat other insects, so they keep bugs from eating your plants. For the most part their ant hills can be tolerated.

Ants in the home is a different story. I understand why you would want to get rid of them in the home.

But if they are in the garden, try to learn to live with them and leave them alone.

Ants and Coffee Grounds

You will find this advice all over the internet. If you want to get rid of ants, put coffee grounds on the ant hill and they will leave. Sounds simple enough. I searched the internet for some scientific evidence that coffee grounds actually work to get rid of ants and found none, so I decided to run some tests. My testing is not very scientific but it does give some insight into the issue.

Ants, Coffee Grounds and the Shed

I built a garden shed about 8 years ago. Almost from day 1, ants took up residence in the shed. There is a space between the two header beams across the main 6 foot wide door. In this space they are well protected, and unfortunately, the way I built it, I can’t easily get at them. I never really tried to get rid of them–they don’t harm anything.

The common advice for using coffee grounds is to put them right on the ant hill, but these ants don’t have a hill. So I tried to put some into the space where they live, and I smeared coffee grounds along the trail they use for getting into and out of their nest. I then watched.

The ants sure don’t like coffee grounds. They would walk up to them, turn around and go back the way they came. That looked very promising, but would this be enough for them to leave the shed?

The next day I came back to see how things were progressing. The ants had pushed the coffee grounds off their path, and life was back to normal. I think I heard one of them squeek “that was a fun diversion for a few hours”.

Ants, Coffee Grounds and the Patio

I have a patio made out of rectangular man-made stones which are sitting on sand. From day 1, ants moved in and live under the stones. I found two entrances to their home, which were quite close together–probably led to the same nest.

One of the openings was just a hole between the stones. Ants were busily coming and going from the hole so I decided to surround the hole with quite a bit of coffee grounds, making a full circle. Ants the came out of the hole, walked up to the grounds, and then went back under ground. Ants arriving from distant lands went up to the coffee grounds, stopped, turned around and went away.

The second entrance consisted of a hill of sand which the ants had excavated. Many ants were busy going and coming using this entrance. I covered the hill with coffee grounds, making sure some sat right in the entrance hole. Same as before, ants would not cross the coffee grounds.

Things looked very promising. Ants clearly do not like the grounds. It could be the smell, or it could be the particles themselves. I was dealing with small ants and the grounds were almost as tall as the ants.

Around noon the next day I returned to the ant hill. All was quiet–no ants. But then I noticed that ants at other untreated hills were also gone–WOW this stuff really works. I came back later in the day to check on things only to find that all the ants were out working again. I guess they took a lunch break during the hottest part of the day. Once things cooled down they were back.

What about the covered ant hill? They had removed almost all of the grounds from the hill and they were back in business. They did abandon the hole that was surrounded with grounds, and made a new entrance almost beside it.

How to get rid of ants with coffee grounds

Ant hill surrounded with coffee grounds


getting rid of ants with coffee grounds

Ant hill with coffee grounds the next day

Ants, Coffee Grounds and Precious Plants

I have a new rock garden full of very small plants and I look at it almost every day. Suddenly one day, one of my prized possessions looked like it was dying. I gave the plant a flick of the finger, and a bunch of ants came scurrying out. They were building a nest right under the plant, and since the plant was only 2 inches wide, they were doing quite a bit of damage.

I ran for the coffee grounds and spread them thickly around the plant. By this time I did not have too much confidence in the stuff, so I also got some Borax + sugar, and shook it over the plant itself. By the next day the ants were gone.

I don’t know if it was the coffee grounds or the Borax, which does work, but not that quickly or maybe it was my fingers shaking the plant. It is very likely that the ants were just starting to build their nest and decided to go somewhere else which was less hostile.

Ants and Coffee Grounds–Conclusion

It is clear that ants do not like coffee grounds, but they don’t seem to mind the coffee itself. When I was applying the grounds some of the coffee also spilled onto the patio stones and they just walked all over it. I also don’t think it is the smell since ants walk right up to the grounds, before turning back. If the smell bothered them, they would turn around sooner.

I suspect that the grounds are just very large in comparison to their size–they are a physical obstacle for the ant. Keep in mind my tests were done with small ants. There are thousands of different ants, and another type might behave quite differently.

Based on my observations, ants don’t like coffee grounds, but they don’t create a major problem for them. They will go around them, ignore them or just move them out of the way. Since I monitor the rock garden closely, I am quite sure the ants had not been there for long, and I am guessing that in the case of the small plant, they had not yet made much investment into their home–so it was easier to move on than to fight me and the grounds.

Unless someone can provide better evidence, I must conclude that coffee grounds are not a good way to get rid of the type of ants I have in my garden.

Other Ways to Get Rid of Ants

Mint is reported to work to deter ants – find out if it works here:  How to Get Rid of Ants With Mint

Coffee Grounds in Garden

What can you do with coffee grounds? How can they be used in the garden? I covered some ideas in my last post which can be found here; Coffee Ground in Garden.


1) Photo Source: Charlie Stinchcomb

If you like this post, please share .......
Robert Pavlis
Editor of
I live in southern Ontario, Canada, zone 5 and have been gardening a long time. Besides writing and speaking about gardening, I own and operate a 6 acre private garden called Aspen Grove Gardens which now has over 3,000 perennials, grasses, shrubs and trees. Yes--I am a plantaholic!

I hope you find Garden Myths an educational site that helps you understand your garden better.

23 Responses to 'How To Get Rid of Ants With Coffee Grounds'

  1. Brittany says:

    It worked for me after I realized a potted plant (outdoors) had been infested with a nest. I was growing edible plants so didn’t want to mess with pesticides. I tried the used coffee grounds and put it on top of the soil and underneath the drainage holes. Within a day all the ants had disappeared. It went from thousands to zero in a snap and I haven’t had any in there since.

    I started using them around and/or in my other containers and have seen less ants in my potted plants than before I started using coffee grounds.

    However, I’ve had lousy results outside of containers. It seems to do nothing in my yard or landscape as they just avoid it for a few days and then ignore it after that.

  2. Pj says:

    Going to try the coffee grounds but in FL I have found orange oil/ d-Limonene. It’s orange peel oil and it kills on contact. It dissolves there hard exoskeleton. I find it cheapest on Amazon. Make 3-4gal at 4oz per gal and make the same in sprayer. I stir up the nest. Wife sprays to keep them at bay while I flood the mound any ant the comes in contact dies… use enough water to reach to bottem of the nest to get the queen!!!

  3. asaf mazar says:

    Ants can be a problem in the garden since they protect aphids from some predators.

    I have tiny fire ants that farm aphids on my vegetable garden, using the irrigation lines as highways. Many of them die on the tomato stems. Apparently the get stuck on the hairs of the stem. I suspect their small size makes them vulnerable to this.

    I prefer not to kill anything, so gardening is a bit of challenge for me.
    My approach is to create the right ecological conditions for the survival of my plants, allowing the balance of nature to keep pests in balance.

  4. Clozano says:

    Pour boiling water on an undisturbed fire ant hill to kill them. It’s works like a charm and cost nothing!

    • Do you have some proof of this?

      I really doubt boiling water works on an established ant hill. Ant homes go down quite deep and are not completely flooded by water – or else they would drown each time it rained. It is very unlikely that water stays hot enough once in the ground, to kill them.

    • Zara says:

      Agree 100%
      When we moved into our house the previous owner never used the back yard. I had 2 kids the age of two and am allergic to antbites. I tried a LOT of herbs and spices and i dont know how many internet idea. Nothing worked well enough to notice a difference. So i boiled water in large pots on all burners so 4. Once boiling I had a smaller lighter pot i used as a laddle. Back and forth. It was a game for the kids. We only did ones that would be in an area we would be using or really really large nests. First day instantly gone. The next day i did a couple but very few.
      I leave them in the gardens they love peonies. Never known if the peonies like it or whether it helps them

  5. Lisa says:

    I read that the coffee grinds had to be wet (or used). Did you use dry coffee grinds right out of the can? I think I will toss dry coffee grind and then use the hose to moisten them up.

    • I’ve never heard anyone say they had to be wet or dry, but people use used coffee grounds. Wet coffee grounds will dry fairly quickly in the sun. I used used coffee grounds that might have been damp.

  6. Patricia says:

    I did not know of ants not liking coffee grounds until today. This morning I went outside to find masses of really tiny ones trekking between a fixed planter and a raised flower bed. I have honestly never seen so many before. When my husband came home I urged him outside to show him the millions of ants. To my amazement they had gone! Earlier I had emptied some coffee grounds at the base of my grapevine as ‘fertilizer’ thinking no more about it. The grapevine happens to be halfway between the planter and the flower bed so I can only assume the disappearance of the ants was due to the coffee grounds. I will resort to this solution in future as I hate killing anything.

  7. R. Rose says:

    Tiny sugar ants are not like the regular “outdoor” ants. They live in your house, not outside coming in. Therefore your advice is not completely accurate. I have found recently that if there is the slightest remnant of ground coffee on the countertop in the morning, there will be several ants checking around, even though the countertop is completely clear of any food. Since we have been very careful about leaving anything the ants might flock to, I’m wondering if it could be the coffee container.

    • It is important to understand that there are hundreds if not thousands of different kinds of ants. New species are still being discovered here in Southern Ontario. Some might like coffee grounds.

  8. Toni says:

    Great article! I hate when those little pests get into the home and seem to laugh at anything you can dish out on them!

  9. mooore says:

    It’s long and tedious, but the only thing that worked for me was spearmint essential oil. Not mixed, just the straight stuff. I dipped a painting brush in it and “painted” a line around my patio. They won’t cross the line. I also had to get rid of the pine on my patio. Rather than kill them in the pine, I just moved it further away.

  10. Mary Magill says:

    My family and I live in Oklahoma and fire ants have invaded our garden. I wouldn’t mind so much other than they bite and it hurts like the dickens. We adhere to a loose “organic” interpretation, meaning we do things by hand a lot to avoid using many chemicals (organic or non) in our garden- so their biting has become a problem and they also become very aggressive when disturbed while we are weeding. Any suggestions for getting rid of the “Hell Boy” of the ant world?

    • I don’t know about fire ants, but the commercial product being sold for getting rid of ants is essentially borax. Mix borax and sugar, 50/50, and place it where the ants will find it. They will take it back to the nest and the borax will kill the ants.

    • Tooften Bitten says:

      This fi for fire ants may not appear to be war mongering, but it worked for me in Austin, Tx. and in central Florida. I filled a bucket “about 2 gallons” of fire ant mound (including fire ants and some eggs) from a mound about 40 meters (140-Plus ft) and poured it out in the middle of the nest’s mound field. The residents attacked and killed the “invading” ants. They then, apparently< went to war with the colony that provided the "invaders," because within 3 days both colonies ceased to exist.

    • Chrisb says:

      The only thing that works is gas, straight down the middle of the nest. Do not light. Works like a charm. I have tried everything.

  11. I use coffee grounds and it works perfectly.

    • I’d love to hear about your experiment setup and the results you got. Without that information, simply stating something works does not tell us anything. The placebo effect is strong.

  12. Tsu Dho Nimh says:

    I saw the “coffee grounds get rid of ants” idea on Pinterest, and dumped a bunch of it on top of a nest of harvester ants.

    they made teeny little zen gardens with the coffee, and didn’t even make a new entrance.

  13. Beekeeping lore recommends powdered cinnamon. It worked for us this season when small black ants tried to establish residence in our hives. The bees were not fussed by it but the ants were gone in a day or so.