# Undefine {#undefine}

We may need to undefine variables or function definitions to release them from memory. For details please check [undef](../../../Functions/u/undef.md).

```
undef all;

x=1;
undef(`x, VAR);

x=1; y=2;
undef(`x`y, VAR);

share table(1..3 as x, 4..6 as y) as t;
undef(`t, SHARED);

def f(a){return a+1};
undef(`f, DEF);

a=1; b=2;
undef all, VAR;
```

**Parent topic:**[Assignment](../../../Programming/ProgrammingStatements/Assignment/Assignment.md)

