Sayyiduna Ibn Umar (may Allah be pleased with them both) narrates that the Prophet (peace and blessings be upon him) said: "O Allah, forgive the sins of those who shave their heads." The companions said: "And for those who trim their hair as well." The Prophet (peace and blessings be upon him) said: « اللَّهُمَّاغْفِرْلِلْمُحَلِّقِينَ » "O Allah, forgive those who shave their heads." The companions said: "And for those who trim their hair as well." The Prophet (peace and blessings be upon him) said three times: "Forgive those who shave their heads." Then he said: "And forgive those who trim their hair as well."
Hadith Referenceصحيح ابن خزيمه / جماع أبواب ذكر أفعال اختلف الناس فى إباحته للمحرم، نصت سنة النبى صلى الله عليه وسلم أو دلت على إباحتها / 2929