These words are both based upon a Latin term meaning "to turn," but they have different meanings and applications in English. Avert means "to turn away," "to ward off": "He quickly averted his eyes." "Drive carefully and try to avert an accident." Divert means "to turn aside," "to distract," "to entertain": "Listen carefully; don't let anything divert your attention." "After the conference, the diplomats diverted their minds by attending a musical comedy." See also advert.
Dictionary of problem words and expressions. Harry Shaw. 1975.