The functor and the arity of Head must be that of a predicate declared as dynamic (or implicitly declared as dynamic by asserting).
retractall/1 satisfies the logical update semantics. Using it to retract all the clauses of a predicate will not, in any way, affect previous calls to the predicate, i.e. they will still see all the clauses that existed at call time.
Success:
    [eclipse]: assert(city(munich)), assert(city(london)).
    yes.
    [eclipse]: retractall(city(_)).
    yes.
    [eclipse]: city(X).
    no (more) solution.
    [eclipse]: retractall(city(_)).
    yes.
Error:
    retractall(X).                  (Error 4).
    retractall("x").                (Error 5).
   % if h/0 is defined, but not as dynamic..
    retractall(h).                  (Error 63).
    retractall(z/0).                (Error 70).