The Messenger of Allah ﷺ said, "Were it not that dogs are a community among the communities, I would have ordered that they all be killed. So kill the pure black ones among them. Any people who keep a dog that is not used for farming, hunting, or guarding livestock, a qirat is deducted from their reward each day."
أخبرنا عمران بن موسى قال حدثنا يزيد بن زريع قال حدثنا يونس عن الحسن
قال رسول الله ﷺ لولا أن الكلاب أمة من الأمم لأمرت بقتلها فاقتلوا منها الأسود البهيم وأيما قوم اتخذوا كلبا ليس بكلب حرث أو صيد أو ماشية فإنه ينقص من أجره كل يوم قيراط
[Hasan]. Abu Dawud narrated it in the Book of Hunting, Chapter on Keeping Dogs for Hunting and Other Purposes, no. 2845, from the hadith of Yazid bin Zuray with this wording. It is also in Kubra, no. 4791. Tirmidhi said in no. 1486 and 1489, hasan sahih, and the hadith has many corroborating narrations. Yunus is Ibn Ubayd.