unalias - macOS


unalias removes aliases from the current shell environment. It can be used to revert temporary aliases or restore the default shell behavior.


unalias [alias_name]




  • Remove the ll alias:
unalias ll
  • Remove multiple aliases:
unalias ll ls grep

Common Issues

  • If the specified alias does not exist, no error is generated.
  • If the alias is a built-in shell command, unalias will not remove it.
  • Be cautious when removing aliases that you depend on. Removing an alias may break scripts or commands that rely on it.


unalias can be used in conjunction with alias to manage shell aliases. For example, the following command defines an alias and then removes it:

alias tmp='echo temp'
unalias tmp
  • alias: Creates and manages shell aliases.
  • type: Displays the type of a shell command or alias.