Avoid having nasty pest on team (8)
I believe the answer is:
sidestep
'avoid' is the definition.
(sidestepping is a kind of avoiding)
'nasty pest on team' is the wordplay.
'nasty' is an anagram indicator.
'on' means one lot of letters goes inside another (as in clothing \'on\' a person).
'team' becomes 'side' (I've seen this before**).
'pest' with letters rearranged gives 'step'.
'step' placed around 'side' is 'SIDESTEP'.
'having' acts as a link.
(Other definitions for sidestep that I've seen before include "Shift to right or left" , "Find a way round" , "To avoid" , "Dodge - circumvent" , "Dodge (an issue?)" .)