Delete all variables - Pluto notebook - Julia


I want to clear all the variables defined before by running a cell in pluto notebook.
I am new here! Thanks for the help

Thank you!

You cannot really clear variables in Julia at the moment. The best you could do is set them to nothing.


Although specifically in a Pluto context this won’t work:

x = rand(5)

in one cell and

x = nothing

in another cell will error out with a multiple definitions error, which is of course expected and desired in Pluto’s reactive programming model.

I am sort of guessing here but perhaps you are worried about “hidden state” which is a problem in Jupyter notebooks, but is not a problem in Pluto notebooks.

In Pluto, you could delete/comment the cells with the variables and save the notebook and find that they no longer exist.

1 Like

Got it. Thanks for the response

I will check it out
Thanks for the response

Ohh cool.
Thanks for the information. I can use this