Remove path to uninstalled codeblocks

I uninstall codeblocks via these commands (Ubuntu 14.04):

sudo apt-get autoremove codeblocks
sudo apt-get --purge remove codeblocks

After that I run:

$ codeblocks
bash: /usr/bin/codeblocks: No such file or directory

That means codeblocks is still stored in a PATH somewhere.

So I have a few Qs:

  • Is the way I used the correct way to safely uninstall everything of codeblocks?
  • If so, why the path is still there (isn't it part of the uninstalling process to remove the path as well)?
  • Where is the file that I can manually remove that obsolete path?

Thanks.


It sounds like the name is still stored in the bash shell's program name cache: if so, you can remove it by typing

hash -d codeblocks

or (to clear the entire cache)

hash -r

Since hash is a shell built-in function, it is documented under the bash manual page (man bash) or via the online help function help hash.