Kaab bin Ujra reported that he was with the Messenger of Allah ﷺ in a state of ihram when lice in his head began to trouble him. The Messenger of Allah ﷺ instructed him to shave his head and said, "Fast for three days, or feed six needy people two mudds each, or sacrifice a sheep. Whichever of these you do will suffice for you."
حدثني يحيى عن مالك عن عبد الكريم بن مالك الجزري
عن كعب بن عجرة أنه كان مع رسول الله ﷺ محرما فآذاه القمل في رأسه فأمره رسول الله ﷺ أن يحلق رأسه وقال صم ثلاثة أيام أو أطعم ستة مساكين مدين مدين لكل إنسان أو انسك بشاة أي ذلك فعلت أجزأ عنك