Is it allowed in Islam to kill household pests, such as flies, spiders, ants, etc.?
Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions. It is lawful to get rid of household pests through killing and the like. But killing them should be done in a good way. As the Prophet (Sallallahu Alaihi wa Sallam) said: "And when you kill, do it in a good way" [Reported by Imam Muslim ]. Killing them in a good way implies not burning them or making them suffer. Allah knows best.
You can search for fatwa through many choices