0

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]#
SSpoke
  • 161
  • 2
  • 10

1 Answers1

1

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

SSpoke
  • 161
  • 2
  • 10
  • 3
    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 00:15