Although there is no explicit Halacha regarding bathing during the Nine Days, the Shulhan Aruch (Orah Haim 551:16) says that some had the custom to refrain as of Rosh Hodesh, while others only refrained during the week of Tisha Be’Av. The widely held custom in Morocco was to refrain from bathing during the entire Nine Days (c.f Meshulchan Avotenou Tishat Hayamim).
It would appear that this is a challenging restriction as people nowadays are accustomed to showering daily, especially in the hot summer weather. distinction is made between bathing for pleasure, such as in hot water, and bathing to remove dirt and other uncleanliness. It should be noted that even on Yom Kippur, washing off dirt is permitted. As such, many rabbis are lenient regarding bathing in lukewarm water as it does not involve the same level of pleasure as hot water. Furthermore, although soap used to be considered a pleasurable accessory to bathing (Levush, ibid.), Rabbi Shmuel Kamenetzky (Kovetz Halachot), Rabbi Moshe Feinstein (Shmatata d’Moshe) and others permit soap since it is used to clean off dirt.
* * *Within the Nine Days is the week in which Tisha Be’Av falls (“Shavua Shehal Bo [Tisha Be’Av]”) which has a greater level of stringency, such as restrictions on laundry or shaving. As an example, if Tisha Be’Av were to fall on a Tuesday, then Shavua Shehal Bo would begin two days earlier, on Sunday the 7th of Av. This year (5779/2019) presents an interesting case as the 9th of Av is on Shabbat and therefore the fast is pushed off till the following day. In such a case, the Shulhan Aruch (Orah Haim 551:4) rules in accordance with the Yerushalmi (Ta’anit) that there is no Shavua Shehal Bo. Rav Ovadia Yosef (Yehve Da’at, vol. 3, § 39; Hazon Ovadia pg. 223), Rabbi Ben Zion Abba Shaul (Or LeTzion, vol. 3, 27:6) and the Ben Ish Hai (Parashat Devarim) all agree that in such a year there would be no week of Tisha Be’Av, but mention that although laundry would be permitted, one should refrain from shaving or getting a haircut. It should be pointed out that the Moroccan custom is to refrain from shaving for the whole Nine Days, and some even stop shaving as of the Seventeenth of Tammuz.
Summary: Although the original Moroccan custom is to refrain from bathing during the Nine Days. There is room to be lenient if one bathes with lukewarm water to remove uncleanliness from one’s body, even in the week of Tisha Be’Av. During Shavua Shehal Bo, it is forbidden to do laundry, wear laundered clothing and shave. In certain years such as this one (5778) there is no Shavua Shehal Bo and those activities would be permitted, but the custom is to still refrain from shaving or getting a haircut. The Moroccan custom is to refrain from shaving as of Rosh Hodesh Av.