Mothballs are commonly thought to repel snakes but it's a myth as they no effect. The best way to get rid of them is to remove their food source.