unalias
Remove an alias
Overview
Removes aliases that were previously defined with the `alias` command or in shell configuration files. This allows users to undo or remove shortcuts they no longer need.
Syntax
unalias [-a] NAME [NAME ...]Common Options
NAMEThe name of the alias to remove.
-aRemove all currently defined aliases from the current shell session.
PersistenceTo permanently remove an alias, you must also remove its definition from the relevant shell startup file (e.g., `~/.bashrc`, `~/.zshrc`) and then source the file or open a new terminal.
Examples
Removes the alias named `ll`.
Removes both the `myip` and `update_system` aliases.
Removes all aliases for the current shell session.
unalias backup
# alias backup='rsync -avh --delete source/ dest/'
source ~/.bashrc