I tried SO many things (cinnamon, coffee, etc.) and finally something worked--big time. I was desperate, and was done trying to keep the ants outside. I put sugar and Borax in little cups in the places where I found ants. For a few days it was CRAZY. Ants came in droves. But then they were killed.
So I realize this isn't good for the ants.
I left intact the ant communities that were around the house and coming into the other rooms. (Cinnamon actually worked well to deter them from the other rooms.) I just couldn't deal with them in the kitchen any more.