Empty your closet. Look for mouse droppings, spills or anything else that may be causing the bad odors. For example, if an animal urinated in your closet, blot up any wet urine. Clean the area thoroughly. If the floor is tiled, use an appropriate floor cleaner to clean the urine. If it's on carpet, you may need to spray a pet odor-removing product as instructed on the label to get rid of any lingering urine odors after cleaning.
Clean the closet from top to bottom with an all-purpose household cleaner. Spray the walls and shelves and wipe them down with a rag. Clean the floor and baseboards as well. Make your own all-purpose household cleaner by mixing equal parts of white vinegar and water in a spray bottle. Vinegar also neutralizes smells. In addition, if your closet is carpeted, consider cleaning with a carpet cleaning machine.
Launder dirty or smelly clothes in 1/2 cup of white vinegar or baking soda during the rinse cycle, states "Good Housekeeping" magazine. Clothing needs to be completely dry before returned back into the closet.
Put everything back in your closet, smelling the items as you go. For example, if your shoes smell, sprinkle their insides with baking soda or a commercial product to remove shoe odors. Leave the powder inside the shoes overnight, shake them out outdoors the next day, then return the shoes to your closet.
Fill a dish, container or sachet with an odor-removing product if the closet has lingering odors. Use coffee grounds, kitty litter, baking soda, activated charcoal, vinegar or lemon juice, recommends the University of Kentucky.