Delete variables

Do you need to delete a variable? This is how you do it:

drop varname

For example:

drop var33

If you have a large number of variables that you want to delete, it might sometimes be easier to tell Stata which the variables you want to retain:

keep varname

For example:

keep var1-var10 var66
Note
You cannot undo the deletion of a variable.
More information
help drop
help keep