Killing Harmful Insects
Question :
In our village, ants abound in unbelievable masses; they damage our food and our clothing, not to mention harming our own bodies. May we kill them, and how should we do that? Is this a trial for us? And if so, how can we ward it off?
Answer:
If the situation in your village is as you have described, you may kill them by any means available to you other than burning them with fire. No doubt, this is a trial, one that necessitates your turning to Allah Almighty and repenting to Him.
Source:
The Permanent Committee
Fatawa Islamiyah, Vol. 8 Page 282