# How to clear everything in Mathematica? [duplicate]

I am a new user. According to a documentation, Clear["context*"] clears all symbols in a particular context.

I want to clear everything (functions, variables, etc..) After I use the above command, my function n1[x,y] is still defined.

Thanks

• try CleanSlate package I do not know if it still works on V 10 or not. CleanSlate, tries to do everything possible to return the kernel to the state it was in when the CleanSlate.m package was initially loaded (I myself, when I want to make sure everything is clear, just restart the kernel) – Nasser Aug 3 '15 at 19:35
• They may be looking for Remove – Andy Ross Aug 3 '15 at 19:45
• Beware: Dynamic content, including Manipulate and DynamicModule, in open notebooks can work against simply clearing or quitting the kernel. – Michael E2 Aug 3 '15 at 19:45
• Did you literally execute Clear["context*"] or did you try Clear["Global*"]? Or perhaps another context? – Michael E2 Aug 3 '15 at 19:47
• You have to delete all outputs containing Dynamic or Initialization for DynamicModules since those are going to be evaluated after you quit kernel. – Kuba Aug 3 '15 at 20:08

Remove["Global*"]

As Nasser points out, the command Quit[] will quit the kernel completely. It will kill the kernel process, stopping the kernel from using any memory or remembering anything at all. Evaluating any command will re-start the kernel from scratch.