.Trash is in use

Jadey

sosumi
I am getting an error (not every time, but quite often) when I try to empty my trash that:

The operation cannot be completed because the item ".Trash" is in use

I've seen a lot of people having problems with permissions, but this isn't the error I'm getting. There is no "insufficient privileges" warning, just that I can't empty the trash 'cause it's in use. Well of course it's in use! I'm trying to empty it :p

Anyway, someone know a fix for this?
 
Thanks for the suggestions! I tried them both. The result of running fstat ~/.Trash in a terminal responded with this:

USER CMD PID FD INUM MODE SZ|DV R/W MOUNT NAME

with nothing underneath, so nothing was using the trash.

I did have classic running, so I shut it off in the control panel. I thought this might work, but I still get the error. :confused:
 
Funny you should ask, I ran fsck -y just this morning. Minor problems first run, everything was clear the second run. I've had this happen before and after this morning's fsck run though.

This happens with any file, but when I decided to post today about it, it was 2 mp3 files.

One new thing I did notice today is that if I put a new file in the trash after I've received the error, I can trash everything - it forgets it didn't want to let me trash files before (another piece of evidence that it isn't a permissions problem).

I haven't tried force removing from the command line.
 
There's a good explanation for this.

You have to keep in mind that the trash can is actually a hidden directory in your home directory named .Trash. When you drag files to the trash, it actually has to edit the .Trash directory to show that those files are now in the trash.

What I'm wondering is if you're immediately trying to empty the trash after putting something in it. If so, the computer might still be writing to the .Trash file (directory) when you attempt to send the command to empty the trash. This would explain the error message stating that the file was in use. And if this is the case, then the .Trash file could somehow be staying open until you add something else to it (i.e. dragging another file to the trash). Then it edits the .Trash file and is actually able to finish this process without the interruption of you trying to empty the trash.

I hope this makes sense..

-kaos : ]
 
I've had the same problem a few times, but I've found a simple workaround.

Just stuff out of the Trash and then put it back in. If you don't have a lot of things in the trash, just move them to the desktop, wait for them to show up, and then re-trash them and empty the trash
 
Actually the items can sit in the trash all day long and refuse to be trashed, so it's not writing to the .Trash file that is the problem.

My current temporary workaround is creating a new folder and trashing it, then everything gets trashed.

Weird bug.
 
Well.. it is actually writing to the .Trash file. The problem is that the file is somehow being left open for editing, in which case the Empty Trash command can't open and edit a file that is already open and being edited by another process in the Finder.


I'm sure this will be fixed in the next release of OS X.

-Will
 
Back
Top