The Messenger of Allah (PBUH) shaved his head during the Farewell Pilgrimage.
The Messenger of Allah (PBUH) and a group of his companions shaved their heads, and some of them cut their hair short. 'Abdullah said that the Messenger of Allah (PBUH) said: May Allah have mercy on those who shave their heads, once or twice. then he said: And those who cut their hair short.
I saw the Messenger of Allah (PBUH) getting his head shaved by the barber, and his companions around him, waiting eagerly for each single hair to fall into the hands of one of them.