Answered by Shaykh Yusuf Weltch
Does dirt under fingernails or toenails affect the validity of ghusl or wudu? Does dirt in ear holes (where ears have been pieced) affect ghusl or wudu?
In the Name of Allah, the Most Merciful and Compassionate
Dirt Under The Nail
Dirt that is found underneath the nails does not affect the validity of ghusl. The dirt of the nails does not prevent the water from reaching the skin. [Shurunbulali, Maraqi al-Falah]
Sunna of Grooming
However, it is the sunna and from the teachings of the Prophet (may Allah bless him and give him peace) to groom oneself.
The sunna is to trim the nails, pluck the hair of the underarm (though it is allowed to shave), to shave the pubic area, and the mustache (although trimming is best). [Mawsili, al-Ikhtiyar fi Ta’lil al-Mukhtar]
If one is wearing an earring, it is necessary to slightly move the earring if it is tight, so that water can reach inside. If one is not wearing an earring and the hole is tightly closed it is not necessary to go through difficulty trying to open the hole for water to reach. [Shurunbulali, Maraqi al-Falah]
If, however, the hole remains open when the earring is not in, one should ensure to make the water reach the hole. Reasonable surety is sufficient and one is not obliged to put oneself in undue hardship or cause themselves pain.
Hope this helps
Allah knows best
[Shaykh] Yusuf Weltch
Checked and Approved by Shaykh Faraz Rabbani