MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to *really* remove a symbol?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110895] Re: How to *really* remove a symbol?
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Sat, 10 Jul 2010 06:32:13 -0400 (EDT)
  • References: <i19995$puv$1@smc.vnet.net>
  • Reply-to: nma at 12000.org

On 7/10/2010 12:59 AM, Yaroslav Bulatov wrote:
> I occasionally run into a situation where a symbol refuses to get
> removed. For instance I can do the following
>
> ClearAll[appPlot];
> Clear[appPlot];
> Remove[appPlot];
> Information[appPlot];
> OwnValues[appPlot]
>
> and it displays {}, and "Information" reports nothing for that symbol.
> But then if I issue "OwnValues[appPlot]" in the next cell, it gets
> initialized to some value I used for it before and I get
> {HoldPattern[appPlot] :>  ....
>
> So far the only thing I found that fixes this is restarting the
> kernel. Is there any other way of removing this symbol?
> I'm on Mathematica 7.0.0 for MacOS
>

may be you can try CleanSlate?

<< "Utilities`CleanSlate`";

Information["CleanSlate", LongForm -> False]

CleanSlate[] purges all symbols and their values in all contexts that 
have been added to the context search path ($ContextPath), since the 
CleanSlate package was read in. This includes user-defined symbols (in 
the Global` context) as well as any packages that may have been read in. 
It also removes most, but possibly not all, of the additional rules for 
System symbols that these packages may have defined. It also clears the 
In[] and Out[] values, and resets the $Line number, so new input begins 
as In[1]. CleanSlate["Context1`","Context2`"] purges only the listed 
contexts.


--Nasser


  • Prev by Date: Re: replacement x->y except in Exp[x]
  • Next by Date: Re: deploying a package in human-unreadable form
  • Previous by thread: How to *really* remove a symbol?
  • Next by thread: Re: How to *really* remove a symbol?