Delete all odd exponents?

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?

This seems to work on your example:

DeleteCases[y, _. x^Optional[_?OddQ]]

Considering we are talking of a summation, I rather see this operation a substitution with zero of the undesired term.
Anyway, this should work as well:

y /. _^exp_ /; OddQ[exp] -> 0

Thanks for the suggestions. I tried using

DeleteCases[y,_.x^_.?OddQ]

but that did not seem to work. Explicitly using the Optional function seems to be the only way to do this other than my original approach of explicitly removing the linear terms. Mathematica syntax continues to confound me.

The RepleaceAll approach leads to the same result of the DeleteCases . At least in my v. 11.0.1

In[7]:= (DeleteCases[y, . x^Optional[?OddQ]]) == (y /. ^exp /; OddQ[exp] → 0)

Out[7]= True