I've got a pretty scary problem. Yesterday I wanted to empty the trash but somewhere in the process it just hung up. I rebooted a few times and tried it again and again but with no result.

I then used the terminal to delete the files out of the .Trash folder manually and I could narrow down the problem to one particular file/folder that I can't delete. If I try rm -rfv <file/foldername> it just hangs up. Even if I try to get more infos about the file/folder with ls -l it will hang up.

I also tried to repair the volume using disk utility with no success.

  • Try the "secure delete" option from the Finder menu. It'll delete even files that are in use, without the need for terminal commands. – user10355 Oct 29 '11 at 9:59
  • Thanks, tried it already but didn't help. – Daniel Oct 29 '11 at 10:29

Tricky indeed, things to try

  • steps recommended by Apple (HT1526) but it seems you did most of them already
  • remove and recreate the whole trash folder: cd ~; rm -rf .Trash; mkdir .Trash; chmod 700 .Trash
  • delete by inode: cd .Trash; ls -i should give you the inode number; find . -inum INODE -exec rm {} \; deletes by inode number
  • hack rmi.c to compile under Mac OSX and use this to remove by inode directly (I haven't tested this)
  • boot into Recovery Mode (on Lion) or from DVD (Snow Leopard and earlier) and run fsck/volume repair
  • boot into single user mode (HT1492) and run fsck/volume repair
  • Thank you very much for your answer! The inode trick is pretty cool, didn't know yet. But nevertheless I'm feeling a little dumb now. The problem with the undeletable file/folder existed since yesterday and even between reboots. And the moment I wanted to test your inode technique the file/folder had just vanished. I have no idea where it went. A weird feeling remains... – Daniel Oct 29 '11 at 10:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .