Lining your closet with cedar should keep them out. I am not sure if it will drive them out. We put cedar and lavendar sachets in our closets and replace them a couple of times a year (the lavendar, not the cedar) and I have never noticed a moth problem in the closet. There are plenty of moths outside and the occasional one inside, but the clothes seem fine.