Ka’ab bin ‘Ujrah said that the Apostle of Allaah ﷺ came upon him (during their stay) at Al Hudaibiyyah. He asked do the insects of your head (lice) annoy you? He said Yes. The Prophet ﷺ said Shave your head, then sacrifice a sheep as offering or fast three days or give three sa’s of dates to six poor people. (Using translation from Abū Dāʾūd 1856)
أَنَّ رَسُولَ اللهِ ﷺ مَرَّ بِهِ زَمَنَ الْحُدَيْبِيَةِ فَقَالَ «قَدْ آذَتْكَ هَوَامُّ رَأْسِكَ؟» فَقَالَ لَهُ النَّبِيُّ ﷺ «احْلِقْ ثُمَّ اذْبَحْ شَاةً أَوْ صُمْ ثَلَاثَةَ أَيَّامٍ أَوْ أَطْعِمْ ثَلَاثَةَ آصُعٍ مِنْ تَمْرٍ عَلَى سِتَّةِ مَسَاكِينَ»