MacOS – Invisible folder after usage of trash-cli

findermacosterminaltrash

Recently, I decided to install trash-cli on my MacBook Pro after using it successfully on my Ubuntu machine. To set it up I ran the following commands.

git clone https://github.com/andreafrancia/trash-cli.git
sudo python setup.py install

After installation, I decided to delete a folder using trash-put. So I run trash-put ~/anaconda/. However, this folder has never arrived in my .Trash folder, yet it disappeared from my Finder (see below, sorry for the mess of files).

Screenshot of Finder in Terminal run with <code>ls -a</code>

So far so good, the folder disappeared. However, when running locate anaconda in a Terminal window the folder Anaconda is still there (only the first couple of lines are shown in the screenshot below).

Screenshot of Finder in Terminal run with <code>locate anaconda</code>

Now, my question is whether any of you guys could have an idea on how I can delete this folder or at least make it re-appear in my Finder?

So far, I've tried restarting my MacBook without success. I've also tried to run rm /Users/admin/anaconda which failed, too.

Running 10.10.1 on a MacBook Pro Mid-2012. I do have administrator rights and full access to all files.


UPDATE 1

  1. rm output

    rm: anaconda: No such file or directory

  2. felix and admin are the same user. I have renamed it for my own convenience purposes, but they are the same!

Best Answer

As you have seen by running ls and rm (and viewing in Finder), the /Users/admin/anaconda folder and its contents are no longer present in the filesystem.

locate uses a database that is updated approximately once a week in OS X, so deleting a file/folder and immediately (or even later that day or week) using locate will not reflect its removal.

You can manually update the locate database by running this command:

sudo /usr/libexec/locate.updatedb

See the locate.updatedb(8) man page for further information.