Error entering equation in DSolve

It is for situations like this that Unset exists. :-)

After the mistaken Set operation:

y'[x] = "oh dear";

y'[x]
"oh dear"

Merely use:

y'[x] =. 

The definition is cleared:

y'[x]
y'[x]

Please see halirutan's answer for an explanation of why ClearAll[y] does not work here.


Very tricky mistake because hard to track down. The problem is that y'[x] parses as

Derivative[1][y][x]

Therefore, your assignment is not to the symbol y but to the symbol Derivative and since you have multiple call like f[][] it goes into its SubValues:

SubValues[Derivative]
(* {HoldPattern[Derivative[1][y][x]] :> y[x]} *)

Therefore, evaluate

SubValues[Derivative] = {};

and the sun shines again

DSolve[{y'[x] == y[x]}, y[x], x]
(* {{y[x] -> E^x C[1]}} *)