
One is forbidden to do field work on Chol HaMoed and in the Sabbatical year except for work required to maintain the field and keep from loss, such as hunting mice and rats which damage the fields. Similarly, the early sages (Tanaaim) stated that one is permitted to destroy anthills on Chol HaMoed and during the Sabbatical year, for ants damage the fields. The scholars asked: How does one destroy an anthill? Answer: The sage Rabban Simon son of Gamliel suggested taking dirt from one anthill and putting it in another, and putting dirt from the second anthill into the first. Due to this foreign dirt the ants will kill each other. One of the scholars, Rav Yamar son of Shalmiya, qualified the statement and ruled that the anthills must be on opposite sides of a river without a bridge, piece of wood, or rope crossing it, so the ants in the two hills have no contact and do not recognize each other’s dirt. He also ruled that the distance between the two anthills must be more than four parsah (four kilometers). If the distance between them is shorter, a river between them is of no help; the ants of one hill still know the dirt of the other anthill and switching bits of dirt will not cause them to kill each other.
(Babylonian Talmud, Tractate Moed Katan 6b)