Unset

lhs=.

removes any rules defined for lhs.

Details

  • 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].

Examples

open allclose all

Basic Examples  (2)

Undefine a value:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Undefine a function:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input

Scope  (2)

Properties & Relations  (2)

Possible Issues  (1)

See Also

Clear  TagUnset  Set  SetDelayed

Tutorials

Introduced in 1988
(1.0)