Washing and drying clothes is supposed to get them clean and smelling fresh. However, if your clothes are coming out with a musty smell, the odor may be originating from your dryer. And, if your dryer smells musty, it might be from mold in areas such as the vents, where moisture could be accumulating. To eliminate the smell effectively, you'll have to clean your dryer thoroughly.
Clean out the lint trap. Remove it and pull off any lint. Wash it in hot, soapy water (e.g. two or three drops of dish detergent per gallon of water) using an old toothbrush or nylon brush. Rinse, shake off the excess water and air-dry before sliding the trap back into your dryer.
Unplug the dryer and let it cool for several hours, if necessary. Then, unscrew the vent hose from the back of your dryer with a screwdriver.
Remove any lint you can reach using a vacuum cleaner wand attachment or long dusting tool. If you can get to the vent on the outside of the house, clean the lint out of that as well. This will hopefully unclog your hose where moisture may be building up, causing the musty smell.
Screw the vent back in securely and plug in your dryer.
Mix 1/4 cup of chlorine bleach with a gallon of water. Moisten a rag and gently wipe down the inside surface of your dryer, including the door. Don't forget the seal and hinge between the dryer and door. Let the bleach solution sit for 15 minutes.
Rinse the bleach off with a clean cloth moistened with soapy water. Then, rinse it again with a clean, wet cloth. Leave the door open until the inside surface dries.
Repeat cleaning and rinsing your dryer if it still smells musty. Only this time, use one part white vinegar and one part water solution instead of bleach.