MacOS – How to delete an undeletable file

aliasmacos

I have removed the Transmit app (ftp program) by drag and drop it to my trash including the other files of the application in the Library folder ~/Library and empty the trash.

Then I found out that there is a file was not thrown away, which is 'com.panic.transmit.sfl'. I tried to delete this file to, but when I want to drag it to the trash, the trash will be changing to an eject arrow icon.

When I double click the file, I have to options: delete alias – this doesn't do anything – or recover alias – that will open a dialog where you can select a file – but I don't know which file should connected to it.

Also the file doesn't have a path, but when I search in ~/Library for transmit the file appears in the finder.

I try to download and install Transmit again. Than there is also a new 'com.panic.transmit.sfl' file created, tha can be deleted, but still the other one is visible.

Is there a way to delete undeletable files?

enter image description here
Doubble click the icon will give to options, described above

Best Answer

First thing to try in these cases is to remove it via Terminal:

  • Open Terminal
  • Type rm followed by a space
  • Drag the file into the Terminal window (wait for the green + sign to appear, then release the mouse button) -> Path to file should get added in the Terminal window
  • Press Enter

Based on your additional information it seems to be phantom file only "known" to Spotlight. To rebuild the Spotlight index, either see Apple's support article on the topic or run

sudo mdutil -E /Volumes/Macintosh\ HD

in Terminal.