Supposedly so, like planting garlic and marigolds and onions through out the beds. We tried it a few times but usually just went out and picked them off. You only have to do it a few nights really intensive, then they either get the picture and don't come back, or we eliminate the majority of them and their season passes.
I just like marigolds in my garden though...I think they have a great scent. Not too sweet.