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?


  • Does hash -d codeblocks get rid of it? if so, it was just stored in the shell's program cache (see help hash); if not, we will need to probe further ... – steeldriver Jul 31 '15 at 2:45
  • spot on, it helped remove the path, and now when I trigger codeblocks from command line, 14.04 would ask for a new install - that's what I need. I suggest you convert your comment to an answer. – artm Jul 31 '15 at 2:58

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.