How can I keep moths out of closets?

Keep moths and bugs out of your closets with cedar. The oil in the wood is a natural insect repellent.
Lining your closet with cedar planks is easy and inexpensive. Buy pre-cut tongue-and-groove planks for about $2.50 apiece. Use a trowel to spread a little mastic glue on the back, and press the boards against the wall and ceiling, tongue side up. 

If cedar-lining an entire closet is not in your budget, consider lining only the drawers and shelves. Note: Cedar oils fade over time; keep the wood fresh and dry by using a dehumidifier. 

You also can deter insects by keeping your closets clutter free, regularly vacuuming closet floors, and storing wool, cashmere and other delicate fabrics in sealed containers or bags.