Back in 2003 when it was pretty obvious that my wise old grandmother would soon leave us, she asked me if there was anything that I wanted to ask her.
I guess she was trying to make amends with anyone who thought she had wronged them.
How such a sweet and lovely woman could wrong anyone was beyond me, and since she adopted me with I was a young juvenile delinquent of 11, and loved and disciplined me, I had only one question:
How can I keep the ants out of my house?
In today's world, my wise old grandmother would be recognized as a "master gardener." After having daily invasions by ants throughout my adult life, I reflected on why we never had ant invasions in our house when I was growing up. Ergo, my question.
She had a simple yet profound answer: "Coffee grounds."
Added with edit: Understand that she meant "used coffee grounds," which I hope any reader would have realized, but one apparently didn't, so I add this clarification.
Now I don't like coffee. I had one sip in college and that was enough for me. I rank it right up there with smoke (cigarettes, marijuana, cigars) as far as substances that I don't want to put in my body.
Being the gardener I am, I realized that coffee grounds are simply a very fine mulch, so I set out to see if a very fine mulch would solve my ant invasion problem.
Yahooooooooooooooooooooooooo!
Can you tell that it did? I have not had an ant invasion since August 2003, six years now. And yet I have ants throughout my property because I see them eating dead snails and other critters. They don't come into the house anymore because every square inch of ground next to my home's foundation is covered with a two- to three-inch layer of "very fine mulch."
The following picture shows the mulch that I use. I buy it at Home Depot for about $5 for a bag of two cubic feet.

There are other types of Earthgro mulch, many of which say "fine texture" or something similar. Find the smallest stuff you can. Place a layer around your home that is about two feet wide and one to two inches deep. If you find ants in your home, check for areas where the kids have dragged the hose and scaped the mulch out, leaving bare soil; or where the dog has dug down to bare soil; and similiar events.
I don't know why ants don't like coffee grounds or fine textured mulch, and I have not found any academic or company research on the problem, but I can tell you that it worked for my wise old grandmother, and it works for me.
Try it, and let me know how it works for you. Maybe we can get some scientific research going here -- LOL.
Hmm, very interesting. I have to try this and put my scientist hat on :) I'm with you I once tried/tasted coffee and never drank it again. ~Rita