In order to eliminate washing machine odors, one must use a cleaner to sanitize the inside surfaces of the machine, and then regularly add cleaner to maintain the cleared surface. Cleaners specifically designed for washing machines can be purchased, or one can use a variety of under-the-counter home remedies.
One of the most common washing machine cleaners is bleach. Either fill up the liquid dispenser in your washing machine labeled "bleach," or add about a tablespoon of bleach to the load, then select the hottest water setting and let it run. Some washing machines have a sanitize or tub clean cycle that is an appropriate option for this type of cleaning. It is recommended that one attempt to fill the cleaning cycle with enough laundry or extra hot water by hand so that the internal water level reaches the most surface area as possible.
An alternative to bleach is a cup of distilled white vinegar in equally hot water. Another option is a cleaner designed with this particular problem in mind, such as those made by Tide and Clorox. No matter which sanitizer is chosen, they all address the problems of bacterial and fungal build-up, which are the main culprits behind laundry machine odors.