It was narrated from 'Abdullah bin Al-Mughaffal that the Messenger of Allah (ﷺ) commanded that dogs be killed, but he made an exception for hunting dogs and sheepdogs and said:
"If a dog licks a vessel then wash it seven times, and rub it the eighth time with dust." (ES)
Arabic/English book reference (ES): Vol. 1, Book 1, Hadith 67 (ES)