MacOS – Finder is showing many files which I have deleted

findermacosterminal

I have an Xcode project which I just deleted so I could rewrite it. (I used rm and rmdir) Here's the problem:

Though ls says that the folder is clean, Finder says it's still, there, and, what's more has the same files it had before I cleaned it.

Output of ls -GFal when run in that directory:

Terminal listing with <code>ls</code>

What Finder thinks is there:

What finder thinks is there

Note: the second photo is exactly what the folder looked like before I cleared it.

I deleted the folder itself, but Finder is still showing it (and it's old contents)

I am using OS X Yosemite 10.10.1.

EDIT: When I restarted, it worked fine. But I would still like to know WHY it happened.

Best Answer

I had the same problem and I solved it by relaunching Finder. Here's how I relaunched Finder:

  1. Hold the ⌥ (alt/option) key on your keyboard
  2. Right click on the Finder icon in your Dock
  3. click Relaunch

Here's a youtube video elaborately showing how to relaunch Finder.

Hope that helps.