The Messenger of Allah ﷺ commanded us to trim the moustaches closely and let the beards grow.
حدثنا الأنصاري حدثنا معن حدثنا مالك عن أبي بكر بن نافع عن أبيه
أن رسول الله ﷺ أمرنا بإحفاء الشوارب وإعفاء اللحى
Muslim also narrated it, no. 259, from the hadith of Malik, through the same chain, and it is in Muwatta, 2/947 (Yahya), and Bukhari narrated it, no. 5892, from the hadith of Nafi, through the same chain.