How do I delete a file that doesn't appear in finder
If a filename starts with a dot (.), it is hidden and will not show by default in Finder. You can show hidden files in Finder by running the following command in Terminal:

defaults write com.apple.finder AppleShowAllFiles YES; killall Finder


Then go back to the containing folder and delete the file normally.

If you don't want to keep the change regarding displaying hidden files in Finder, run

defaults write com.apple.finder AppleShowAllFiles NO; killall Finder


afterwards.