Rebuild the shell's command hash table (hash -r)
Q: So I uninstalled cmake, and reinstalled it with an updated version, and the path is correct, and the file is there, but whenever I try to run cmake, bash echoes -bash: /usr/bin/cmake: No such file or directory
A: You need to type hash -r to rebuild the shell's command hash table. It still "remembers" having found cmake in /usr/bin, so it just goes there, rather than searching through the search path again. Or you could start a new shell. Or logout and login again, or reboot.
sdmrnv, 2019-06-04 [0.394ms, s]