Abu Rafi reported,

The Messenger of Allah ﷺ commanded me to kill dogs, so I went out to kill them, and I would not see a dog without killing it. Then I came upon a dog circling around a house, and I went to kill it, but a person called out to me from inside the house, "Abdullah, what are you trying to do?"I replied, "I want to kill this dog."She said, "I am a woman left on my own, and this dog drives wild beasts away from me and alerts me when someone is approaching. Go to the Prophet ﷺ and mention this to him."So I went to the Prophet ﷺ and mentioned it to him, and he ordered me to kill it.

Azami 14850

Sahih

عن أبي رافع قال

أمرني رسول الله ﷺ أن أقتل الكلاب فخرجت أقتلها لا أرى كلبا إلا قتلته، فإذا كلب يدور ببيت، فذهبت لأقتله، فناداني إنسان من جوف البيت: يا عبد الله ما تريد أن تصنع؟ قال: قلت: أريد أن أقتل هذا الكلب، فقالت: إني امرأة مضيعة، وإن هذا الكلب يطرد عني السبع، ويؤذنني بالجائي، فأت النبي ﷺ فاذكر ذلك له، قال: فأتيت النبي ﷺ فذكرت ذلك له، فأمرني بقتله.

الأعظمي 14850صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Superior moral conduct
Chapter
Kindness to animals
Section
Killing dogs
Numbering
Jami al-Kamil 14850 (2nd edition)
Azami 14850