Clearing macros

stata

The following command removes all variables, scalars and programs that I add:

clear all 

However, global and local macros stick around.

I would like to know how to clear these out:

  • interactively from the command line and/or
  • as an opening line in my do files

Best Answer

You can drop all macros with:

macro drop _all 

This is documented in help macro and the corresponding manual entry.

Related Topic