All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
Keeping the beard is complying with the Prophet`s order for he (PBUH) said: "Do the opposite of what the pagans do. Keep the beards and cut the moustaches short.' Whenever Ibn `Umar performed the Hajj or `Umra, he used to hold his beard with his hand and cut whatever remained outside his hold." {Related by Bukhari & Muslim}. The beard being a sign of dignity and decency, the Prophet (PBUH) used to adorn with it. Muslims from among the companions, the successors, the scholars and the righteous used to do so as well. To rebuke an offender and effect a discretionary punishment on him, some jurists and judges even commanded that he shaves his beard as a sign of the shame that he suffered. Therefore, the shaving of the beard in the Muslim land only spread in later ages.
However, there is no sin in trimming the beard, but not shaving or shortening too much, since "Whenever Ibn `Umar performed the Hajj or `Umra, he used to hold his beard with his hand and cut whatever remained outside his hold." {Related by Bukhari & Muslim}. Ibn Hajar commented on this by saying: "Apparently, Ibn Umar practiced this at other times and not only when performing Hajj or Umra." {Fateh Al-Barie, vol.10/pp.350}. Hanafie scholar Ibn Humam said: "Keeping the beard, here, refers to neither shortening most nor all of it to go against the act of the fire-worshippers. This meaning is supported by the Hadith in which Abu Huraira reported: "The Messenger of Allah (PBUH) said: Trim closely the moustache, and grow beard, and thus act against the fire-worshippers." {Related by Muslim}."Trim closely the moustache and grow beard" indicates the reason for keeping the beard, which is acting against the fire-worshippers. Moreover, none of the scholars have permitted trimming the beard too closely." {Fateh Al-Khadeer, vol.2/pp.348}.
This is under normal circumstances, but if growing the beard led to a problem on the level of the family or the work, then this matter should be referred to the people of knowledge because each case has its own circumstances.
Anyway, shaving the beard without a valid excuse doesn`t make one an apostate. Rather, it is a sin that requires making repentance and holding on to righteousness. And Allah The Almighty Knows Best.