Deleting a variable removes it from AutomationView's in-memory store. It does not edit your Python or machine source: if a file still references the name, re-parsing that file re-creates the variable. Delete is therefore mainly useful for clearing unused variables.
Using the Variables view: hover over an unused variable and click the inline Delete button (close icon). A confirmation prompt appears.
Using the Command Palette: run AutomationView: Delete Variable.