Mothballs are not a guarantee when dealing with squirrels. But squirrels do not like the scent of mothballs. Replace the mothballs every few weeks and it may help get rid of squirrels in the attic.