Spraying ants with an insecticide is a good way to kill them, but they often seem to come back to the same spot. One of the best lines of defense is keeping areas where you see ants clean. Ants typically come indoors to hunt for food. Removing their food source will help you get rid of them. If getting rid of ants is a problem in your home, try a homemade ant killer. You can make it with just a few basic ingredients.
Grind up about a quarter-cup of dry cat or dog food.
Place the ground pet food in a small bowl.
Add ½ tsp. of boric acid powder and 1 tsp. of molasses to the bowl.
Stir the mixture together and place about 1 tsp. in a few old jar lids.
Place the jar lids in areas where you have seen trails of ants. They will eat this poisonous mixture and take some back to the nest, where it will kill other ants as well.