0

First, when I never had installed sl:

diogosaraiva@Ubuntu:~$ sl
O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo:
sudo apt-get install sl

traslaction: "The program 'sl' is not currently installed. You can install it by typing:"

But when I'm tired of it and I remove it by typing sudo apt-get remove sl per example...

I get this when I type sl:

-bash: /usr/games/sl: Ficheiro ou directoria inexistente

translate: "-bash: /usr/games/sl: No such file or directory"
instead of:

diogosaraiva@Ubuntu:~$ sl
O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo:
sudo apt-get install sl

This appears with others packages too...

How I get rid of this: -bash: /usr/games/sl: Ficheiro ou directoria inexistente ?

I want see the original:

diogosaraiva@Ubuntu:~$ sl
O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo:
sudo apt-get install sl

Output of type sl

sl está hasheado (/usr/games/sl)

1 Answers1

2

Bash hashes the entries in the PATH to avoid unnecessary expensive lookups. Due to this, sometimes outdated entries may remain in the hash. You can clear a specific hash entry using:

hash -d sl

Or clear the entire hash table:

hash -r

Reference:

muru
  • 197,895
  • 55
  • 485
  • 740