All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
It is not obligatory to kill these Fawaasiq (vicious and harmful creatures); rather, it is only recommended, as has been stated by scholars of Fiqh. It is possible that killing them is obligatory, but some wordings of the ahaadeeth about killing them suggest that it is not obligatory. For instance, the Prophet, sallallahu ‘alayhi wa sallam, said, “There are five (kinds of creatures) for which there is no sin on the one who kills them (while he is) in the state of Ihraam (ritual consacration) or inside the Haram (sacred precincts of Makkah): the rat, the scorpion, the crow, the kite, and the mordacious (biting) dog.” [Al-Bukhari and Muslim; this is the wording of Muslim]
The hadeeth which used an imperative mood was also narrated by Imaam Muslim: ‘Aa'ishah, may Allah be pleased with her, said, “The Prophet, sallallahu ‘alayhi wa sallam, commanded killing five harmful creatures (whether) in the state of lhraam or otherwise.” [Muslim]
Ash-Shawkaani wrote:
“The hadeeth cited by Muslim uses the imperative mood, while the hadeeth reported by Abu ‘Awaanah says, ‘Let the person in Ihraam kill...’ The apparent indication of the imperative is that it is obligatory, but it is also possible that it is to state recommendation and permissibility. Al-Bazzaar narrated on the authority of Abu Raafi’ that the Prophet, sallallahu ‘alayhi wa sallam, commanded killing the scorpion, rat, snake, and kite. This command came after prohibiting the person in Ihraam from killing. Scholars held different views concerning a command following a prohibition and whether it is indicative of obligation or not. A version of the hadeeth cited by Muslim reads, ‘He is permitted...’ and a version cited by Abu Daawood reads, ‘Killing them is lawful for the one in Ihraam.’” [Nayl Al-Awtaar]
The hadeeth cited in Saheeh Muslim which uses the imperative mood was the subject of a chapter in Imaam An-Nawawi's commentary on Saheeh Muslim under the title “Chapter on the creatures that are recommended to be killed by the person in a state of Ihraam or otherwise in the Sacred Precincts or outside them.”
Shaykh Ibn ‘Uthaymeen wrote, “It is recommended for the Muslim to kill these five harmful creatures while in a state of Ihraam or otherwise, within the Haram or outside it...”
Imaam As-Suyooti wrote:
“Animals can be classified into four categories in this regard:
Firstly, those which have benefit and no harm; it is impermissible to kill them.
Secondly, those who have harm and no benefit; it is recommended to kill them, such as snakes and harmful creatures (referred to in the hadeeth as the five Fawaasiq).
Thirdly, those who have benefit in one respect and harm in another, such as the hawk and falcon; it is neither recommended nor disliked to kill them.
Fourthly, those who have neither benefit nor harm, such as worms and beetles; it is neither prohibited nor recommended to kill them.” [Al-Ashbaah wa An-Nathaa'ir]
In brief, the command to kill these harmful creatures is apparently a recommendation and not an obligation; i.e. it is not obligatory to kill them. Even assuming that the command indicates obligation, then the obligation is waived in case of the person's inability to kill them or when killing them entails unbearable hardship.
Allah knows best.