Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed ethtool using yum install ethtool and then removed it using rpm -e --nodeps ethtool because when I tried to remove ethtool with yum it was going to remove a bunch of important dependencies like php, httpd, etc.

When I run any command which shouldn't exist such as fakecommand I get this message:

[root@test sbin]# fakecommand
-bash: fakecommand: command not found
[root@test sbin]#

However, when trying to run ethtool after removing it with rpm -e --nodeps ethtool I get No such file or directory instead of No such file or directory:

[root@test sbin]# ethtool
-bash: /sbin/ethtool: No such file or directory
[root@test sbin]#
share|improve this question

To fix this, all you have to do is restart the ssh connection. Turns out, it was just a client-sided cache.

share|improve this answer
Specifically, from the man page: "[b]ash uses a hash table to remember the full pathnames of executable files. hash -r would have fixed the problem as well. – Mark Wagner Dec 24 '13 at 0:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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