MacOS – Folder cannot be deleted from Trash

deletingfat32macostrash

I have three nested folders in my trash: folder1/folder2/folder3. They were on an external FAT32 drive but were deleted, along with all the files inside them, a while ago.

When I try to empty the trash on Yosemite, I get a "file in use" error. I get this even after reboots, with no programs open, and nothing which could be using it.

Navigating to /Volumes/External_name/.Trashes/501/folder1/folder2/folder3 with Terminal gives me a very weird error: I call ls and obtain:

username-Mac:folder3 username$ ls
Filename_with_ö.mp3
username-Mac:folder3 username$ ls -l
ls: Filename_with_ö.mp3: No such file or directory

I strongly suspect it's something to do with the interaction between OS X, FAT32, and that ö, but I have no idea how to delete a file which doesn't seem to exist… any ideas?

Solutions tried

Finder > "Secure Empty Trash" still gives me the "file in use" error. "Disk Utility" > "Repair disk" doesn't fix it either. Also tried:

username-Mac:folder3 username$ sudo rm -r F*
rm: Filename_with_ö.mp3: No such file or directory

and

username-Mac:/ username$ sudo rm -r /Volumes/external_name/.Trashes
rm: /Volumes/external_name/.Trashes/501/folder1/folder2/folder3/Filename_with_ö.mp3: No such file or directory
rm: /Volumes/external_name/.Trashes/501/folder1/folder2/folder3: Directory not empty
rm: /Volumes/external_name/.Trashes/501/folder1/folder2: Directory not empty
rm: /Volumes/external_name/.Trashes/501/folder1: Directory not empty
rm: /Volumes/external_name/.Trashes/501: Directory not empty
rm: /Volumes/external_name/.Trashes: Directory not empty

and

username-Mac:folder3 username$ mv Filename_with_ö.mp3 safe.mp3
mv: rename Filename_with_ö.mp3 to safe.mp3: No such file or directory

and

username-Mac:external_name username$ sudo mv .Trashes /external_trashes
mv: .Trashes/501/folder1/folder2/folder3/Filename_with_ö.mp3: No such file or directory
mv: /bin/cp: terminated with 1 (non-zero) status

Still no success.

Best Answer

I have two suggestions. My first is to try creating a folder called .Trashes elsewhere and moving it such that it would overwrite the original folder; it's possible that this would leapfrog the problem (I used a similar method to fix a problem I was having a few months ago).

Alternatively, if the external drive is FAT32, have you tried booting a Linux distro from a USB drive and using that? Alternatively you could plug the external drive into a Windows machine (Boot Camp/VirtualBox?) and see whether that can delete the offending folder.