Set your washing machine to the clean or sanitize cycle if it has one. If not, set it to the heavy-duty cycle and hot water temperature.
Add 1 cup white vinegar, ½ cup chlorine bleach or ½ cup dishwasher detergent to the machine. If you have a top-loading washer, add the cleaning agent directly to the water. If you have a front-loading machine, put the cleaning agent into the laundry detergent dispenser. Let the washing machine run through an entire cycle.
Wipe out the inside of the washing machine with a dry rag once the cycle has finished. Wipe out the rubber gasket around the door with a rag and all-purpose cleaner if you have a front-loading washing machine.