To remove an alias in your shell, you can use the unalias command followed by the name of the alias you want to remove. Here’s the syntax:
unalias alias_name
Example
-
Open your terminal.
-
Remove the alias. For example, to remove the alias
ll, you would type:unalias ll -
Verify the removal. You can check if the alias has been removed by typing:
alias
Note
If you want to remove all aliases at once, you can use:
unalias -a
Keep in mind that if you have added the alias to your shell's configuration file (like ~/.bashrc or ~/.zshrc), you will need to remove it from there as well to prevent it from being recreated in future terminal sessions.
