Measure the detergent you use according to the package’s instructions. Using too much detergent can cause buildup in the machine and provide breeding grounds for bacteria and mold. If you have a high-efficiency washer, use only high-efficiency detergent.
Leave enough room in the washer for your laundry to move around freely. Overloading the washer keeps excess moisture in the drum, which leads to odor. Also, air is not circulating properly when the washer is too full.
Clean your washer about once a month. If your washer has a clean cycle, run it. If not, run the washer through a complete cycle –sans laundry, of course—with no detergent. Add 1 cup of white vinegar in place of the detergent. Wipe out the drum and seal around the door after running the clean cycle. If you have a front-loader, wipe the rubber seal with a dry cloth after each load. Cleaning the washer will get rid of buildup that leads to odor.
Take your laundry out of the machine promptly after the wash cycle is finished.
Add 1 cup of white vinegar or 1 cup of baking soda to each load of laundry during the wash cycle. Both products work well at removing odors.