I use to have many ant problems - and certainly not due to any lack of cleanliness.
It pretty much all went away once I got a cat. At first I thought it was coincidence, but over the years I noticed if I ever killed a random ant the cat would start rolling around and scenting the very spot the ant was killed.
I don’t have any scientific proof, but I have to think the cat’s scent/pheromones interferes with the ants and prevents more from following/coming.
Curious to hear any similar experiences