Ants are attracted to kitchen counters and various other areas of the home due to the presence of both food and shelter. These pests carry diseases and bacteria, both of which transfer onto counter space, food items and other areas. Pesticides are not required to remove the ants, as cucumbers are a natural ant repellent. The scent of the cucumbers covers up the odor created by the ants, and also detracts the ants from returning to that area of your home.
Slice the skin off the cucumber, as this is the fruit's most bitter part, according to Washington State University.
Locate the entrance area used by the ants, such as a hole in your wall, and notice the path taken by the ants from the entrance point to other areas of your home, such as a kitchen counter.
Eliminate any visible ants using a vacuum cleaner or damp paper towel. Discard the paper towel into the toilet when finished.
Wipe the inside portion of the cucumber skin over any areas previously covered by the ants.
Place the cucumber skin at the kitchen entrance point. The smell of the cucumber confuses the ants and keeps them from returning to that particular area.