Flush REPL (also inside Atom)

Hello, is there a way to flush everything that is in memory and get a fresh REPL without doing CTRL+D and running the julia command again?. Running in a console it is not too much trouble, but I while inside Atom (Juno), I cannot do it. Sometimes I’m running things and I get errors due to things that were left in memory from the previous run, like loaded packages, and variables.

thank you!

I posted some code here a while ago. Haven’t used this in a while, hopefully it still works.