18 May 2016   command-line


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.

๐Ÿ„