Removes variables and functions from the running shell.
unset full_name   #Remove the full_name variable 
unset -v first middle last   #Remove the other variables 
 
 
Use unset -f to remove functions:
who_is_on ( ) {   #Define a function 
who | awk '{ print $1 }' | sort -u   #Generate sorted list of users 
}
unset -f who_is_on   #Remove the function 

Man Page of 'unset'

 
   
Early versions of the shell didn't have functions or the unset command.
POSIX added the -f option for removing functions, and then added the -v option for symmetry with -f.

Web Page Copyright: 亞洲大學資訊電機學院 連耀南 yaonanlien@asia.edu.tw  unset.htm,  Thu Sep 7 16:18:51 CST 2023