Avoid dunce’s cap, excelling (though only somewhat) (6)
I believe the answer is:
escape
'avoid' is the definition.
(I know that escape is a more specific form of avoid)
'dunce's cap excelling though only somewhat' is the wordplay.
'only somewhat' indicates the answer is hidden within the clue (only some of the letters in the clue).
'ESCAPE' is hidden in the letters of 'dunces cap excelling though'.
(Other definitions for escape that I've seen before include "'Break free, get away (6)'" , "Get away from confinement" , "Elude, dodge" , "Evade" , "Elude; leakage" .)