08 Jun 2016


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.