Deleting all the odd terms in a polynomial expansion does not remove the linear term. I can delete that term explicitly but I am wondering if there is another way to do this. For example,
In[5]:= y = Expand[(a + x)^6]
Out[5]= a^6 + 6 a^5 x + 15 a^4 x^2 + 20 a^3 x^3 + 15 a^2 x^4 +
6 a x^5 + x^6
In[6]:= DeleteCases[y, _. x^_?OddQ]
Out[6]= a^6 + 6 a^5 x + 15 a^4 x^2 + 15 a^2 x^4 + x^6
This leaves the term linear in x but
In[7]:= DeleteCases[y, _. x^_?OddQ | _. x]
Out[7]= a^6 + 15 a^4 x^2 + 15 a^2 x^4 + x^6
deletes it. Is there a better way to do this?