retractall/1

Deletes all clauses matching the given head

retractall(Head) -(i)

Compatibility: LPA Win-Prolog, most other Prologs.

Remarks: This predicate deletes all clauses, whose heads match the given Head; no variables are bound during this call. The given Head can be partially or fully instantiated, although as a minimum it must include the predicate name, and any arguments must be fully enumerated. Even where no matching clauses are found, the call succeeds; if the target predicate did not previously exist, again the call succeeds.

See also:

retract/1

retract/2