unset command can be used to unset a variable in the terminal.
Let’s see an example
test=some_value
echo "Value before unset=$test"
unset test
echo "Value after unset=$test"
Output
Value before unset=some_value
Value after unset=
As you can see from the output above that the value of variable test becomes empty after unset command is run.