removes any rules defined for lhs.


  • Rules are removed only when their lefthand sides are identical to lhs, up to renaming of patterns.
  • Unset[Once[expr]] removes any stored value for Once[expr].


open allclose all

Basic Examples  (2)

Undefine a value:

Undefine a function:

Scope  (2)

Clear values of variables:

Clear functions (downvalues):

Properties & Relations  (2)

Use =. to clear definitions with a particular left-hand side:

Clear all definitions:

Use Unset[Once[expr]] to clear a remembered value of Once:

Possible Issues  (1)

To clear an upvalue, the tag has to be given:

Introduced in 1988
Updated in 2016