I have a following problem.
f[1]=1; f[2]=2; f[_]:=0; dvs = DownValues[f];
this gives
dvs = { HoldPattern[f[1]] :
Based on Simon's excellent solution here, I suggest:
Cases[DownValues[f], _?(FreeQ[#[[1]], Pattern | Blank] &)]