When I execute a program without specifying the full path to the executable, and Bash must search the directories in $PATH
to find the binary, it seems that Bash remembers the path in some sort of cache. For example, I installed a build of Subversion from source to /usr/local
, then typed svnsync help
at the Bash prompt. Bash located the binary /usr/local/bin/svnsync
for "svnsync" and executed it. Then when I deleted the installation of Subversion in /usr/local
and re-ran svnsync help
, Bash responds:
bash: /usr/local/bin/svnsync: No such file or directory
But, when I start a new instance of Bash, it finds and executes /usr/bin/svnsync
.
How do I clear the cache of paths to executables?