Answered by Shaykh Amjad Rasheed
Is it permissible to kill vermin unconditionally? What if it is outside the house and I fear harm or I fear that it would enter my house? How about roaches?

It is permissible to kill harmful vermin such as snakes. In fact, it is praiseworthy to do so, as [scholars] stated explicitly. As for what neither benefits nor harms, it is not unlawful to kill it, rather it is offensive, whether it is inside the house or outside.
– Amjad Rasheed
(Translated by Lida Kahi)