To obviate means to eliminate the need for something or to prevent something from happening. If you want to obviate the possibility of a roach infestation, clean your kitchen regularly.
The prefix ob means "to go against." That makes sense when you look at the words obstruct and obstacle, but how about obstetrics? Why does the name of the branch of medicine dealing with birth have the same root as words that mean "stop" or "get in the way"? Because a midwife stands opposite to, or against, the woman giving birth.