Wipe down the inside of your washer with a wet, clean rag that has been wrung out in a sanitizing solution made with one part bleach and eight to nine parts water. Wipe the inside down a second time with a wet rag to rinse.
Open up the washer to promote good air circulation, dissipate any lingering odors and dry out any moisture. Keep the door open between uses to prevent musty smells from accumulating.
Wash a load of laundry in hot water, using the correct amount of laundry detergent as indicated on the label. According to the Washington Post, washing one load of laundry in hot water every four to five times helps prevent and eliminate musty and other washer odors. Note that towels and other linens are usually safe to wash in hot water.
Run an empty cycle through the washer if it still stinks, adding a commercial product specifically formulated to remove washer smells. Use per label directions. Alternatively, add 2 to 3 cups of white vinegar and run an empty cycle using hot water.