I had an alias in my
.bashrc and I really don't want it anymore. I erased the
alias, but my bash already has this alias loaded.
Can I erase this
alias from this bash without logging out?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
If you have many aliases and wish to clear them all, run
unalias -a. Then you can source your
.bash_aliases) file to use the aliases there.
$ unalias -a $ # '.' is like an alias to 'source' $ . ~/.bashrc
Sometimes it is desirable to disable an alias temporarily instead of unaliasing it entirely. To do this, put a
\ in front of your command.
$ alias foo=ls $ foo ... ls output ... $ \foo bash: foo: command not found $ foo ... ls output ...