This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Programming / Scoping  /

  • Remove[ , ... ] removes symbols completely, so that their names are no longer recognized by Mathematica.
  • Remove[" ", " ", ... ] removes all symbols whose names match any of the string patterns .
  • You can use Remove to get rid of symbols that you do not need, and which may shadow symbols in contexts later on your context path.
  • Remove[" form "] allows metacharacters such as *, as specified in Section¬†A.3.13.
  • Remove[" context `*"] removes all symbols in a particular context.
  • Remove does not affect symbols with the attribute Protected.
  • Once you have removed a symbol, you will never be able to refer to it again, unless you recreate it.
  • If you have an expression that contains a symbol which you remove, the removed symbol will be printed as Removed[" name "], where its name is given in a string.
  • See the Mathematica book: Section 1.3.10, Section 2.6.8, Section 2.6.12,¬†Section A.5.4.
  • See also: Clear.

    Further Examples

    See the Further Examples for Clear.