For ants, it’s actually pretty simple. The ultimate defense is simply to remove the source of attractants i.e food crumbs, sugar or any sort of food really. Unwashed dishes could also be a source of food for ants. If you don’t plan on washing your dishes there and then, at least soak them in soapy water. Ants absolutely hate this mixture and will stay away. If your ant problem is very persistent, it might be worth exploring your second, more extreme option: ant baits.
Ant baits are basically poisonous baits that will kill the ants slowly over time once they’re ingested. The best part about such pest baits is that it has a chain reaction sort of effect, whereby the poison will pass on from one ant to another, until all of them or the entire ant nest is destroyed completely. Other natural, DIY methods include using mint leaves or cucumber peels as deterrents. Whilst not as effective as its chemical alternative, a natural solution is obviously healthier because even if you accidentally ingest it, it won’t hurt you. Ideally, instead of just leaving cucumber peels or mint leaves in random locations in your house, you should leave it at the point of entry where the ants are coming in from. Just follow the line of ants back to its point of entry, usually a tiny hole or crevice which leads to the outside of your house. Then set these natural pest deterrents in the way of the ants.