He should give it a warning three times. If it appears to him after that, he should kill it, for it is a devil.
Sunan Abi Dawud Book 43, Hadith 486