This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
[an error occurred while processing this directive] $HistoryLength

  • $HistoryLength specifies the number of previous lines of input and output to keep in a Mathematica session.
  • The default setting for $HistoryLength is Infinity.
  • Values of In[ n ] and Out[ n ] corresponding to lines before those kept are explicitly cleared.
  • Using smaller values of $HistoryLength can save substantial amounts of memory in a Mathematica session.
  • See the Mathematica book: Section 2.13.1.
  • See also: $Line.