O comando interno unset usa uma opção, -f , para excluir funções:
unset -f foo
Forme a entrada unset no bash manpage:
If -f is specified, each name refers to a shell function, and the function definition is removed.
Nota: -f só é realmente necessário se existir uma variável com o mesmo nome. Se você também não tiver uma variável chamada foo , então unset foo excluirá a função.