MathGroup Archive 2012

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

Search the Archive

Re: Clearing all variables and definitions: i.e. "resetting" mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128263] Re: Clearing all variables and definitions: i.e. "resetting" mathematica
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sat, 29 Sep 2012 20:09:17 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

On 9/29/12 at 2:56 AM, brenttnewman at gmail.com (Brentt) wrote:

>Hi, is there any way to reset an entire session, clearing all
>variables and definitions to what they would be when opening up
>mathematica. Occasionally I look through the docs for this
>functionality but it has always eluded me (and I must have read most
>of the docs by now ), so usually will just shut down mathematica and
>restart. There has got to be a better way right?

At the beginning of a session, load the package
Utilities`CleanSlate`. Then later when you want to reset things
to the state that existed when the CleanSlate package was loaded
simply do

CleanSlate[]

I have this package loaded at the start of every session by including

<<Utilities`CleanSlate`

in my init.m file.

Also, you can load this package later in your session if you
like. Then computations done before the CleanSlate package was
loaded are preserved. Only things done after the CleanSlate
package is loaded are reset.




  • Prev by Date: Re: Problem with SetDelayed lhs:=rhs
  • Previous by thread: Re: Clearing all variables and definitions: i.e. "resetting" mathematica
  • Next by thread: Problem with SetDelayed lhs:=rhs