Gardeners usually consider ants to be pests, as it's true that ants can loosen the soil around young plants, causing them to die. Some species shelter and protect aphids so that they can feed on the aphids' sweet honeydew. On the positive side, ants can improve air circulation in heavy soils and their burrows improve water drainage.
Give ants an eviction notice
Mix equal parts of water and white vinegar and spray it into anthills and around areas where you see ants. Ants hate the smell of vinegar, so it won't take long for them to move on. Keep the spray bottle handy for outdoor trips and to keep ants away from picnic or play areas.
Scatter talcum powder liberally
Scatter talcum powder liberally around your house's foundations and known points of ant entry. Other effective organic repellents include cream of tartar, borax, powdered sulfur and oil of cloves.
Plant mint
Plant mint around the foundation of your house. Besides keeping ants away, the mint leaves can be brewed into delicious, caffeine-free tea.
A mash of hot chiles and water
A mash of hot chiles and water will keep ants away. You can make another repellent by pureeing a few orange peels and a cup of warm water in the blender, then pour it directly into an anthill early in the morning.
Boric acid mixed with sugar
Boric acid mixed with sugar is an effective ant poison, but only in gardens with no children or pets. Spread it on a piece of wood or stone near the nest, then cover it to protect it from the rain. The foraging ants will love it and take some of the poison back to their nests.
To get rid of a colony
To get rid of a colony, first plug the drainage hole of a large flowerpot with a cork or tightly wadded plastic wrap, then place the pot upside down over the anthill. Heat a teakettle of water to its boiling point and flood the surrounding soil. While you heat a second kettle of water, ants will seek shelter in the overturned pot. Quickly turn it upright and fill it with boiling water.
Create an ant barrier
Create an ant barrier around plants, on front steps and between garden rows with a sprinkling of agricultural lime, bonemeal or powdered charcoal.
If ants are swarming your garden path
If ants are swarming your garden path, add 1 tablespoon (15 cc) of ground black pepper (or any other strong-smelling ground spice, such as cloves or dry mustard) to 1 cup (240 cc) of sifted white flour and sprinkle the mixture on and around the pests. They'll vanish within the hour. Sweep the dry mix into the garden or yard instead of trying to hose it off; water will just make it gooey.
Ant-free picnics
You watch helplessly as the ants march up the picnic table leg, onto the tabletop and into the picnic meal. Here's a foolproof way to stop them in their tracks: Set the bottom of each table leg into a plastic container and fill the containers with water. The ants won't be able to crawl past the wet barrier.
Fire ants
Fire ants, better known in the South as red ants, are tenacious little creatures with vicious stings. They are especially partial to sun and sandy soil. If your yard is prone to infestation, provide shade with vine-covered trellises in a part of the garden where sun-loving plants won't be affected. If you keep compost, store it in closed bins so that the fire ants can't use it to build their hills.
Inside the house
Inside the house, safely repel ants by sprinkling pennyroyal, camphor, clove oil, tansy, spearmint or broken eggshells on a few dishes, then place them in closets and on shelves.
Wrap bands of paper
Wrap bands of paper coated with non-drying glue around the bases of fruit trees to prevent ants from reaching the fruit. An easy way is to fold a sheet of adhesive paper, such as the kind of liner used on shelving, in half with the sticky side exposed.

Kurt_G/Shutterstock
You can keep ants out of your garden by planting mint around the border of your house.

