If a text variable is not used in any parameters, you can select that variable, right-click on it, and select Delete, or you can click on the Delete link at the bottom of the variables section. Note that there is no way to retrieve the deleted variable, and therefore you need to use this with care. If a text variable is used in one of the actions, these options will be disabled.

Delete Text Variables in the Editor Application