To remove a mildew smell in fabric from a specific area of fabric, make a thick paste with lemon juice and salt, rub the paste over the affected area, and then dry the area under direct sunlight. Repeat until the mildew stain and smell are gone. Use vinegar, baking soda, bleach or heavy duty detergent if the mildew odor affects the fabric uniformly.
Soak the fabric in a solution of equal parts water and white vinegar to remove mildew smell. Alternatively, use the washing machine to wash the fabric with regular detergent. Stop the final rinse cycle and add 1 cup of vinegar. Let the fabric soak for at least an hour, or overnight. Use full-strength vinegar if the problem persists.
If vinegar doesn't solve the problem, use baking soda. Rewash the fabric and add 1 cup of baking soda on the last rinse cycle. Stop the machine and let the fabric soak for at least an hour or overnight. Rinse the fabric and use a fabric softener before machine-drying. Another option is heavy duty detergent, useful for cleaning the clothes of construction workers and mechanics.
Alternatively, use bleach to remove mildew odor. Bleach damages some fabrics, so make sure the fabric can handle this substance. Use 1/2 cup of chlorine bleach with warm water if the garment tag states that the fabric supports bleach. Mix 1/4 cup of oxygen bleach and 1 gallon of warm water to soak garments that don't allow hot water or bleach washing. Soak the fabric for at least half an hour and rinse thoroughly.