Naphthalene, the active ingredient in mothballs, does repel roaches along with other insects. But with potentially serious health consequences from ingesting, touching, or inhaling, you don't want to use mothballs for roaches and might want to reconsider its use for other pests.