how to delete all programs, inputs and output in the sage console ?
I've tried all commands I know : reset(), !clear, %clear i, -ipython history clear, ipython history trim, --ipython locate profile default to clear history in my sage console but all of these do not work ,
,
Hello, @andriam! In my case, writing
reset()
deletes all user-defined variables, and thenclear
cleans the console. Could you be more specific about your problem? What do you want to achieve? Perhaps and example?If the goal is to clear the ipython history, this was asked and answered at
The rest of my comment expands on the comment by @dsejas.
If the goal is to recover the state of variables at the start of Sage, use
If the goal is to get a clean terminal window with a fresh sage prompt and none of the previous computations visible, use
Note that after this
clear
command, you can still scroll back to see the previous input and output.Of course, maybe what you really want to do is hit
Ctrl
+D
to leave Sage, close the terminal window, open a new terminal window, and start a new fresh Sage session.Hello, I want to clear all history what I have written on the console and all of the oitputs of all time so that onlly the word "sage :" remains in the console. That is, when I scroll back, I don't want to see all previous history