According to Good Housekeeping Magazine, washing clothes with one cup of sudsy ammonia and rinsing the garments twice can help to remove sour smells. Sour smells can also be removed from clothing by re-washing the items at the highest water level setting and the warmest water temperature allowed per the garment tag instructions, followed by immediate machine drying.
Sour smells can also be removed from clothing by adding 1 cup of vinegar and 1 cup of baking soda to the washing machine prior to washing, followed by outdoor air-drying of the garments. For tougher odors, pouring an entire bottle of fabric deodorizer into a cold water wash can help to neutralize odor-causing bacteria. Sour odors can also be minimized by freezing the garments, adding disinfectant to the washing machine, adding pine cleaner to the washing machine or spraying rubbing alcohol directly onto dry clothing.
Laundry that smells sour immediately following a wash typically points to a problem with mold or mildew in the washing machine. Mold and mildew buildup can be remedied by pouring 1 cup of dishwashing detergent or bleach into the empty washing machine and running a full cycle on the hot setting. If the smell remains after cleaning the washer, there may be deeper mold growth that can only be removed by taking the machine apart and cleaning out the mold by hand.