This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

ClearAll

ClearAll
clears all values, definitions, attributes, messages, and defaults associated with symbols.
ClearAll
clears all symbols whose names textually match any of the .
Define values and attributes for a symbol:
Clear values and attributes:
Define values and attributes for a symbol:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Clear values and attributes:
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=
Clear values of variables:
Clear functions (downvalues):
Clear upvalues:
Clear several symbols:
Clear all symbols in a given context:
Specify symbols to clear as string patterns:
Clear any old definitions before making new ones:
Unprotect and clear all symbols in a package, to allow it to be read twice:
Clear does not remove defaults, options, or attributes:
Use ClearAll to clear everything:
Use to clear definitions with a particular left-hand side:
Clear all definitions:
Protected symbols cannot be cleared:
Use Unprotect to clear definitions of protected symbols:
Clear the definitions of all symbols in the current context:
New in 1