This is an old revision of the document!


The unset builtin

unset [-f] [-v] [NAME...]

The unset builtin command is used to unset values and attributes of shell variables and functions. Without any option, unset tries to unset a variable first, then a function.

Options

Option Description
-f treats each NAME as a function name
-v treats each NAME as a variable name

Return status

The return status is 0 unless an invalid option or an invalid combination of options is given or a NAME is readonly.

unset -v EDITOR

unset -f myfunc1 myfunc2

You could leave a comment if you were logged in.