Take all laundry out of the washer. Set the machine to the highest water level and the hottest temperature setting.
Add 2 cups of white vinegar to the water as it's filling up. If you have a front loader, fill the detergent dispenser with white vinegar. Let the machine run a full wash cycle.
Scrub the bleach and fabric softener dispensers with a soft toothbrush and all-purpose cleaner. Wipe the rim around the drum with a dry rag to remove any loosened grime. If you have a front loader, wipe in between the rubber seal with a dry rag to remove stagnant water. Put a dab of petroleum jelly onto a clean rag and wipe any stains or buildup off of the inside of the seal.
Run another cycle of only hot water to clear away any loosened grime.