Sunan an-Nasa'i, Book 1, Hadith 67 (Nasa'i 67)

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."