The Messenger of Allah ﷺ ordered that dogs be killed, then he said, "What is the matter with them and the dogs?" He then permitted keeping hunting dogs and sheepdogs, and he said, "When a dog laps from a vessel, wash it seven times, and on the eighth, scour it with dust."
حدثنا أحمد بن محمد بن حنبل حدثنا يحيى بن سعيد عن شعبة حدثنا أبو التياح عن مطرف
أن رسول الله ﷺ أمر بقتل الكلاب ثم قال ما لهم ولها فرخص في كلب الصيد وفي كلب الغنم وقال إذا ولغ الكلب في الإناء فاغسلوه سبع مرار والثامنة عفروه بالتراب
Muslim narrated it in the chapter on the ruling on a dog licking (a vessel), Purification, hadith 280, from the hadith of Shubah, transmitted through him. Nasai also narrated it, hadith 67, 337, 338, as did Ibn Majah, hadith 365.