If non-liquid food falls on my clothes on Shabbos, how am I allowed to clean it?
It would depend on what type of dirt you are referring to:
• Dirt stuck to clothes and is: 1. Moist and soft and 2. A stain will remain after the dirt is removed.
You can either: 1. Rub the reverse side of the cloth until the dirt drops off. 2. Remove the dirt directly, with one’s fingernails or the back of a knife. 3. Wipe the dirt off gently with a dry cloth, taking care not to squeeze out any moisture absorbed within the garment.
It is forbidden to: 1. Wipe the garment with a wet cloth. 2. Wet the garment in order to clean it.
• Mud or any similar substance which has dried onto a garment may not be taken off at all, as it will crumble while being removed, and this is an infringement of the prohibition against grinding.
Nonetheless, if 1. The dry dirt consists of food that either was previously ground, such as dough or farina, or became pulpy in cooking, as beans, for example sometimes do, and 2. The dirt will leave a stain on the garment after it has been taken off, then it may be removed in one of the three permitted ways listed above.
• Dirt which will not leave a stain may be removed from a garment to which it is stuck only if one would not normally be particular to keep the garment free of that kind of dirt. It is irrelevant in this connection whether the dirt is moist or dry (keeping in mind that dry dirt of the type mentioned above may not be removed at all).
To remove the dirt one cannot use water or any other substance that cleans.
• Dirt which is on the surface of – but not absorbed in or stuck to – a garment does not fall under the prohibition against cleaning, and it may be removed by hand (but not with a brush) or blown off.”
שש”כ פרק טו, כח, ל-לג.