How to clear variables in ipython?

grasshopper picture grasshopper · Apr 8, 2014 · Viewed 277.6k times · Source

Sometimes I rerun a script within the same ipython session and I get bad surprises when variables haven't been cleared. How do I clear all variables? And is it possible to force this somehow every time I invoke the magic command %run?

Thanks

Answer

aisbaa picture aisbaa · Apr 8, 2014

%reset seems to clear defined variables.