Ibn Mughafal reported,

The Messenger of Allah ﷺ ordered that dogs be killed, then said, "What is the matter with them and the dogs?" Afterwards, he granted permission to keep hunting dogs and sheepdogs.

Muslim 4021

Sahih

حدثنا عبيد الله بن معاذ حدثنا أبي حدثنا شعبة عن أبي التياح سمع مطرف بن عبد الله

عن ابن المغفل قال

أمر رسول الله ﷺ بقتل الكلاب ثم قال ما بالهم وبال الكلاب ثم رخص في كلب الصيد وكلب الغنم

مسلم 4021صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Sharecropping of orchards
Chapter
Command to kill dogs, its abrogation, and the prohibition of keeping them except for hunting, farming, livestock, and similar purposes
Numbering
Darussalam 4021
Muslim 4021