Remove aliases set by the alias command
unalias [-a] name [name ...]
-a: Remove all defined aliases.
name: Specifies one or more defined aliases to be removed.
unalias returns true unless the alias you are trying to remove is not defined.
# Remove all defined aliases
unalias -a
# Remove specific defined aliases (assuming they exist in the current environment)
unalias vi
unalias ls grep
name parameter when the -a option is not used.If a bash script executed via the
sourcecommand runsaliasorunalias, it may affect the alias settings of the terminal environment. Alias settings in the terminal can also affect the results of the script. Scripts called viashor executed directly with proper permissions are not affected by the terminal environment's alias settings.
alias command.help command for related help information.