If your house becomes infested with cockroaches, mice, or even ants, you might have to exterminate them. It is certainly not a pleasant process, but often quite necessary.
To exterminate means "to kill off or destroy completely." Notice that it includes the word terminate which means, “to end.” It is usually used in reference to insects or rodents, but also unfortunately in reference to people or groups of people. It is just a coincidence that this verb shares a syllable with termite — a bug that often has to be exterminated before it eats through the wood of your home.