Is it permissible for me to kill insects?
From an Islamic perspective killing harmful insects is permissible, even recommended, to avoid the harm they do. The Prophet (peace and blessings be upon him) declared it permissible to kill such insects even in Al-Haram (the Holy Mosque) of Makkah where hunting is originally impermissible.
The Messenger (peace and blessings of Allah be upon him) said: ‘There are five pests that may be killed whether one is in ihram (state of consecration) or not: rats, scorpions, crows, kites [a hawk-like bird], and mad dogs.’ (Reported by Muslim). Thus the Prophet (peace and blessings of Allah be upon him) told us that they are harmful pests, and that they are unlike other animals which do not do harm, and so he told us to kill them whether we are in ihram or not. If other creatures such as ants, cockroaches or dung-beetles cause harm, they may also be killed with insecticides or other means.
Thus, it is recommended to kill every harmful insects and crawling thing [the Arabic word hasharat includes both insects and arachnids], like scorpions, lice, mosquitoes, or fleas.
Even harmless insects which are the ones that do not cause serious diseases, If they negatively affect your life or households by damaging the property or causing chaos, hurting children let alone the uncleanliness caused by their existence in the house, it is then permissible to kill them.