Say you wrote a function that you donโt want anymore:
# ~/.bashrc
function rake() {
echo 'rake is gone ;)'
}
$ rake db:migrate
rake is gone ;)
$
You can remove it with the unset
command:
$ unset -f rake
The -f
flag passed to unset
ensures that we only remove a function.