An exterminator was someone who eradicated non-sentient lifeforms, generally insects, from areas where they were unwanted.
Doctor Paul Stubbs likened the nanites which had taken control of the USS Enterprise-D in 2366 to mosquitoes. Not believing that they were sentient, he suggested that the devices be dealt with in the same manner as a "mosquito that bites your ear", with an exterminator. The eventual discovery of the nanites' sentience, however, precluded that possibility. (TNG: "Evolution")