Garlic is effective in repelling ants because they dislike its strong smell. To use garlic for this purpose, grind garlic cloves to extract the juice, then fill a spray bottle with the juice and spray it in areas where ants are present. The lingering smell of garlic will deter ants from returning.