Reduce memory usage in a session by limiting the amount of history that is remembered.

The Wolfram System saves previous inputs and outputs for later reference using %, In and Out. By default, every previous input and output is saved. You can save substantial amounts of memory in a Wolfram System session by limiting the number of previous expressions it remembers.

Reduce the amount of session history that is saved

Set the Wolfram System to save no history:

In[1]:=
Click for copyable input
Out[1]=

Previous evaluations are no longer available via %, In or Out:

In[2]:=
Click for copyable input
Out[2]=

Set the Wolfram System to remember the last two evaluations:

In[3]:=
Click for copyable input
Out[3]=

The previous two evaluations are available via %, In and Out, but not evaluations further back:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=

Restore saving session history

Return to saving all previous evaluations:

In[6]:=
Click for copyable input
Out[6]=