asslam wa alykum
in fatwa no:121752
it is said that it is not permissible to kill ants but is it permissible to kill them because they put bad impression on the guests and make the house look dirty by climbing on walls
All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
It appears –Allaah Knows best –that this impression is not a sound reason by itself for killing the ants because they are a nation that praises and glorifies Allaah and there is a religious text about the prohibition of killing it, so it should not be killed unless it harms.
For more benefit, please refer to Fataawa 84945 and 87944.
Allaah Knows best.
You can search for fatwa through many choices