On the authority of Ibn `Umar (may Allah be pleased with him) who reported that the Messenger of Allah (peace be upon him) saw a lad who shaved a part of his head and left the other part unshaved. So he prohibited the Companions from doing that and said:
Shave it all or leave it all.
(Reported by Abu Dawud)
1. It is strongly disapproved to shave one part of the head and leave the rest unshaved, because this is a distortion and imitation of the People of the Book (Jews and Christians). Yet, it is permissible to shave part of the head if there is a necessity such as treatment or any other valid excuse.
2. It is permissible either to shave the whole head or leave it as is. If one lets his hair grow, he should keep it clean.
This Hadith was copied from