Nafi' (may Allah have mercy on him) says that when Sayyiduna Ibn Umar (may Allah be pleased with them both) shaved his head in Hajj or Umrah, he would also trim his moustache and his beard.
(b) In a narration of Nafi' (may Allah have mercy on him) these words are added: "and his nails too."
(c) Ibn Jurayj (may Allah have mercy on him) says: I said to Ata (may Allah have mercy on him): "What if he (the pilgrim) does not do anything (neither shaving nor cutting)?" He said: "The statement of Allah Almighty is: With your heads shaved and (hair) shortened [Surah al-Fath: 27]."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 9403