Sunan Abi Dawud, Hadith 5238

The tradition mentioned above has also been transmitted by Ibn 'Ajilan through a different chain of narrators briefly. This version has: He should give it a warning three times. If it appears to him after that, he should kill it, for it is a devil.

حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا يَحْيَى، عَنِ ابْنِ عَجْلاَنَ، بِهَذَا الْحَدِيثِ مُخْتَصَرًا قَالَ ‏ "‏ فَلْيُؤْذِنْهُ ثَلاَثًا فَإِنْ بَدَا لَهُ بَعْدُ فَلْيَقْتُلْهُ فَإِنَّهُ شَيْطَانٌ ‏" ‏ ‏.‏

sunnah.com

also referenced under: Hadith 5258 (DarusSalam)