There are more reliable ways to get rid of ants
A way to get to the source of an ant problem, indoors or out is to put out a bit of food near where ants have been seen. Once the ants find the food, they will take it back to the colony. If you track them on their return trek you should be able to identify the location of the colony. There are a multitude of ant killers that can be used to mitigate your infestation. Indoors When the nest is indoors, it's often quite difficult to find the source. It's often inside a wall or floor. But don't worry, you won't have to tear down walls or pull up floors. Bait is an effective method to get rid of an entire colony. Simply place the bait near where ants when been found. Foraging ants will pick up the insecticide and take it back to the nest where it ultimately destroys the colony. When looking for the source, look at your baseboards for gaps. Those ants in your kitchen could be coming from the outside. Of course you can't get rid of all the bugs in your yard. Try to find out how the pests are getting into your home. Check window sills and bottoms of doorways. Caulking around exposed areas can keep out pests (not to mention dirt and rain). Outdoors The intrusion of ants may be reduced by spraying liquid insecticide around the exterior of the home. Be sure to focus on entry points like windows, doors and where utility pipes enter the home. Outdoors ants can be found in planters, under mulch, or around the base buildings. Often nests are easy to find. You will notice a mound or anthill. Liquid insecticide can be used here as well by drowning out the underground nests and destroying the colony. As when working with any chemicals, be sure to read labels carefully. Another option is the use of granules. These small pellets are consumed by pests like other baits and taken to their colonies. What ever your method of controlling ants it will take periodic checks and possible reapplication to ensure that you are getting the best protection you can.