From: Yaroslav Bulatov on
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

From: Nasser M. Abbasi on
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

From: Vincent on
On Jul 10, 9:59 am, Yaroslav Bulatov <yarosla...(a)gmail.com> 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

Could you post an example that reproduces the problem?

From: Leonid Shifrin on
Hi Yaroslav,

I can not reproduce the behavior you report. M7.0, Win Xp. Once the symbol
is removed,
OwnValues[symbol] always returns an empty list. In fact, I never heard of
anything different. One
problematic case is when there remain symbols whose definitions contained
the removed
symbol - it is then changed to Removed[symbol] in those, but you seem to be
worried
about something else.

May be you could provide an exact sequence of inputs which lead to the
behavior you observed?

Regards,
Leonid


On Sat, Jul 10, 2010 at 11:59 AM, Yaroslav Bulatov <yaroslavvb(a)gmail.com>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
>
>
From: Carl K. Woll on
On 7/10/2010 2: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
>
>

Do you have dynamic content in your notebook? It's possible that a
Manipulate or some other piece of dynamic content is reinitializing your
variable.

Carl Woll
Wolfram Research