It is a mitzva to launder one’s clothing before the festival. In order to make sure that people would not be lazy about it, the Sages prohibited washing clothes on Ḥol Ha-mo’ed. That is, although based on the halakhic principles of Ḥol Ha-mo’ed, doing laundry should have been permitted as long as the clothing would be worn on Ḥol Ha-mo’ed, in the same way that other unskilled labor is permitted for a festival need, nevertheless, the Sages prohibited it so that people would not delay doing laundry until Ḥol Ha-mo’ed, when they are not working. For were they to do so, people would begin the festival in dirty clothes, thus belittling Yom Tov (MK 14a; SA 534:1). Therefore, one may not wash shirts, pants, dresses, skirts, suits, and the like on Ḥol Ha-mo’ed. An exception to this rule is the clothing of babies and small children. Not only do these get dirty quickly, but even if they are washed before the festival they will get dirty again. Therefore, they may be washed on Ḥol Ha-mo’ed for festival wear (as is explained in the next section).
A stain on clothing may be removed using water and/or cleaning agents, because removing a stain was not included in the decree. However, as long as one has other clean clothes, it is preferable that he wear them rather than remove the stain. If the stained item of clothing is preferable to the unstained one in some way, it may be cleaned in order to wear it on Ḥol Ha-mo’ed or Yom Tov. (See SSK 66:72.)
If one owns only one outfit, the Sages permitted him to wash it on Ḥol Ha-mo’ed. For even if he washes it before the festival, one can assume it will get dirty during the week of the festival, and the Sages did not want to force anyone to wear dirty clothing during the festival. Therefore, if one has only one shirt or dress and it gets dirty, it may be washed on Ḥol Ha-mo’ed. One should be careful to wash the clothing discreetly, meaning in a washing machine at home, and should not hang the clothes outside to dry.
In contrast, if one owns two outfits, he may not wash during Ḥol Ha-mo’ed even if they are both dirty and he will be unhappy wearing them, as the Sages assumed that two outfits should be enough to take one through the festival. Even when one of the items is not as nice as the other, he is still considered as one who owns two garments, and he may not do laundry on Ḥol Ha-mo’ed. Similarly, if one owns a dress and a skirt-blouse outfit, she is considered to own two garments. Even if both get a little dirty, she may not wash them. Rather, she should wear them as is.
If one has one outfit for the weekday and one for Shabbat and holidays which he would not wear during the week, he is considered to have only one outfit. Should his Shabbat outfit get dirty, he may wash it before the concluding Yom Tov.
When all of one’s available clothes are so dirty that he’d be embarrassed to leave the house in them, he may wash one outfit so that he will not be forced to remain at home. (Normal ironing is permitted, as we explained in section 7.)
If a person owns two outfits, one of which is for weekday wear and one of which is for Yom Tov (and Shabbat), there is disagreement as to his status. Some say that he is considered to have two garments, and thus may not wash his Yom Tov garment if it got dirty (Avnei Yashfeh 104:4), while others maintain he is considered to have only one garment, so if it got dirty he may wash it (Or Le-Tziyon 3:24:3; Ḥut Shani 15:6). It would seem when this last opinion is taken into consideration together with the upcoming rationale, one may be lenient.
According to MK 18a-b, linen clothes may be washed, either because they are white and constantly get dirty, so washing them before Yom Tov is insufficient (MT, Laws of Yom Tov 7:21; Nimukei Yosef), or because they are easy to wash (Rashi; Ran). Nevertheless, by the time of the Rishonim, the custom was to be stringent about this, possibly because it is difficult to draw distinctions between different types of clothing. In practice, SA rules that it is prohibited to wash linen clothes (534:2). However, when there are additional reasons to be lenient, such as in the case of one who has only one outfit for Yom Tov and one for weekdays, we may take into account the rationale of Rashi and Ran that the leniency to launder linen was because it is easy to do so. Accordingly, using a washing machine would be permissible.
If one has two outfits but they are both so dirty that he is too embarrassed to leave the house wearing them, it would seem that it is permissible to wash them, on the grounds of preventing a loss. After all, he would otherwise “lose out” on prayers, Torah classes, and family meals. Some have written in the name of R. Elyashiv that washing may be permitted in this case because of human dignity. For the prohibition to do laundry refers to cases where it would be a little embarrassing to wear the dirty clothes. If it would be extremely embarrassing, washing is permissible. See Harḥavot.