1

I wanted to install the tree command to look at /var/www. I can ls /var/www and the directories it contains. Permissions on those directories are set to 755.

I ran

sudo snap install tree

thereafter running

tree /var/www

returns the message

/var/www [error opening dir]

I removed the tree snap with

sudo snap remove --purge tree

...and installed tree with

sudo apt install tree

Now when I try to use tree I get

-bash: /snap/bin/tree: No such file or directory

How to I banish the snap version of tree from my machine completely?

Zanna
  • 70,465
NetFool
  • 141

1 Answers1

2

Steeldriver had the solution!

It's likely not in your "machine" - just in your shell's hash table. Try hash -d tree or hash -r to clear the whole table - see for example Why is my system only looking in /snap for binaries?

Zanna
  • 70,465
NetFool
  • 141