Shaving the head (halq) is more virtuous than trimming (taqsir) for men after both حج and عمرہ. نبی کریم (صلی اللہ علیہ وسلم) made دعا three times for those who shave their heads and only once for those who trim, indicating the superiority of shaving. He said: 'O Allah, forgive those who shave their heads,' and the companions said: 'And those who trim, O Messenger of Allah?' He said: 'O Allah, forgive those who shave their heads.' They repeated the question three times, and on the third occasion he added: 'And those who trim.'
Sheikh Ibn Baz stated that while both shaving and trimming are valid ways to exit the state of احرام, shaving is preferred and carries greater reward based on نبی کریم's triple دعا. He مستحب that men shave their heads after حج and after عمرہ. However, if a man is performing حج tamattu' (عمرہ followed by حج), it is better for him to trim after the عمرہ and save the shaving for after the حج rites on the Day of Sacrifice, so that he has hair to shave during the greater rite.
Sheikh Al-Albani confirmed the superiority of shaving and noted that نبی کریم himself shaved his head during the Farewell حج. He distributed his hair among the companions, who treasured it. For women, shaving the head is not permissible — they only trim a fingertip's length from the ends of their hair. This applies to women after both حج and عمرہ without exception.