Only shaving or trimming facial hair (beard) with shaving machines in a way that people say there is no beard anymore, is impermissible based on obligatory precaution. Also, shaving a portion of the beard has the same ruling as shaving all of it. Thus, shaving the hairs on the cheeks or neck and behind the neck which aren't considered part of the beard, and also the hairs under the armpits, etc., using such machines is permissible.
It is noteworthy that Islam pays special attention to cleanliness and has emphasized on getting rid of excess body hair.
Here, we will list some Islamic recommendations regarding hygiene:
1- It is mustahabb to cut hair on the head or take care of it, along with washing and brushing it.
3- It is mustahabb to trim pubic hair, and has been said to be a sign of one’s faith in Allah (swt) and the hereafter, and is a tradition of the prophet (pbuh).
4- Trimming hair on other parts of the body is hygienic and has different positive physical and mental effects, and keeping it is the cause for certain physical and mental harms.
 The growth of facial first happened after Prophet Adam’s dua saying: “O Lord! Increase my beauty!” Allah (swt) answered I made the beard the zinah (adornment) of you and your children till the Day of Judgment.” In a hadith by the prophet of Islam, he says to keep the beards long in order not to resemble the Jews and Zoroastrians. See: Hilyah al-Muttaqin, fifth book, fourth and fifth chapters.
 Istifta’at of Imam Khomeini, vol. 2 (makasib muharramah), pg. 30, issue 79, pg. 31, issue 81, and pg. 32, issue 84.
 Is it permissible to have a goatee? All of the maraji’ (except Ayatullahs Makarim and Tabrizi): No, it doesn’t suffice and is the same as shaving the entire beard. Imam Khomeini, Istifta’at, vol. 2, makasib muharramah, issue 84; Ayatullah Wahid Khorasani, Minhaj al-Salihin, vol. 3, issue 43; Ayatullah Khamenei, Ajwibah al-Istifta’at, issue 1413; Ayatullah Sistani, www.sistani.org, beard shaving, questions 1 and 3; Ayatullah Safi Golpaygani, Jami’ al-Ahkam, vol. 2, issue 1743; Ayatullah Bahjat, Tawdih al-Masa’il, miscellaneous, question 4; Ayatullah Nuri, Istifta’at, vol. 1, issues 492 and 493; Ayatullah Fazel Lankarani, Jami’ al-Masa’il, vol. 1,issues 955 and 957.
 Hilyah al-Muttaqin, fifth book, third chapter.
 Hadiths tell us: trimming the mustache is a tradition by the prophet of Islam (pbuh); long mustaches are a place for Shaytan. Trimming the beard brings about abundance in sustenance, eliminates grief and waswasah and prevents leprosy, and one who doesn’t trim the mustache, isn't ‘of us’. Hilyah al-Muttaqin, fifthe book, fourth chapter.
 Plucking nasal hairs promotes beauty of the face. Hilyah al-Muttaqin, fifth book, seventh chapter.
 Armpit hair has been considered a place for Shaytan. Of course, regarding how to get rid of such hair, it has been said: “Depilatory is better than trimming and trimming is better than plucking.” Ibid, seventh chapter.
 Trimming it has been counted as a sign of faith and it is a tradition of the prophet. Seventh chapter.
 Trimming body hair promotes strength, soundness of the body, and removes distress and gloominess, and promotes cleanliness and is of the demeanor of the prophets. Ibid, ninth chapter.