I had a function inside .zshrc that I removed.Now, when I try to source it, it indeed sources it, but doesn't remove the function that once was inside .zshrc from memory.Is there a way to remove the function (now I believe in memory, in zsh namespace or something like that) without restarting my machine?
Is it possible to source again .bashrc and .zshrc AND remove functions once inside them without restarting?
zsh;configuration
In zsh, you can remove a function with unhash -f functionname or unfunction functionname.That doesn't automatically clear functions you've removed from a given startup file, though, because of course the shell doesn't remember where it got it from in the first place and attribute any special meaning to re-sourcing the same file. So you'll have to know what you want to forget.Since you mention .bashrc in the subject: the bash equivalent is unset -f functioname