Help me delete this undeletable Safari download file

Hi,

I was using Safari to download a file when the browser crashed leaving a .download file behind. I dragged the file to the Trash and tried to delete it, but I got:

'The operation cannot be completed because the item "GRAW_SOTF.zip.download" is in use'

I made sure Safari wasn't running, tried again, same error. Logged out, logged in, same error. Restarted, same problem.

I then tried dragging the file back on to the Desktop, but this time I got:

'The Finder cannot complete the operation because some data in "GRAW_SOTF.zip.download' could not be read or written. (Error code -36).'

I opened Safari, cleared the Download window, tried to delete again, but got the original error message.

I tried deleting in Cocktail, but that program doesn't let me browse to the Trash.

I've run Trash It! and that doesn't seem to be able to touch the file.

So I rolled up my sleeves and then tried using the Terminal:

sudo rm -rf ~/.Trash/*

but got the response:

rm: /Users/mike/.Trash/GRAW_SOTF.zip.download: Directory not empty

The command:

lsof /Users/mike/.Trash/GRAW_SOTF.zip.download/

showed no programs were using the file.

According to Info the file occupies 0kb, belongs to Safari and I have read and write permissions.

So I'm stumped.

Any suggestions?

Thanks in advance.

MacBook Pro 15" 1 Gb RAM Mac OS X (10.4.9)

Posted on Mar 22, 2007 4:06 PM

Reply
9 replies

Mar 23, 2007 12:51 AM in response to Mike Richards2

Not sure if you still having problems deleting the file..
only a suggestion which has worked for me...
Find the file you trying to delete and hold down control key and click on file and get infor..when it opens infor window check to see the file has the locked box check mark..unlock and then you can trash it.
Most files are locked with Safari when system crashes.

Mar 22, 2007 6:23 PM in response to Michael Conniff

Things get a bit more bizarre. But the situation might have resolved itself.

ls -aolR ~/.Trash gives me:


total 0
drwx------ 3 mike mike - 102 Mar 22 23:00 .
drwxrwxrwx 24 mike mike - 918 Mar 21 17:58 ..
drwxrwxrwx 5 mike mike - 170 Mar 18 09:14 delete.rtf
/Users/mike/.Trash/delete.rtf:
ls: delete.rtf: No such file or directory


delete.rtf was a name I used when I tried to delete the .download file. When I tried that solution, my Mac said it couldn't rename the file, but it looks like it did at some point.

The Trash icon now says the Trash is empty, opening Trash shows that the file has gone and I can empty Trash without any warnings.

I'm not sure why delete.rtf is still being mentioned by ls though.

I think I'll put this one down to black magic or general positive vibes from the Mac community.

Many thanks for your response.

Mike.

MacBook Pro 15" 1 Gb RAM Mac OS X (10.4.9)

Mar 23, 2007 1:31 AM in response to Mike Richards2

I spoke too soon.

I restarted the Mac after using Cocktail and Onyx to try and remove the file. Trash now contains a folder called delete.rtf.

If I try to delete the folder I get:

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

So I'm back where I started apart from the change in filename.

Thanks for the suggestion about using Info; here's what I get:

Size: Zero KB on disk (Zero bytes)
Where: /Users/mike/.Trash
Disk image: /Users/.mike/mike.sparseimage

The file is unlocked

Ownership

You can: Read & Write
Owner: mike (that's me if you hadn't guessed)
Group: mike
Others: Read & Write

Back at the Terminal:

ls -aolR ~/.Trash gives:


total 16
drwx------ 4 mike mike - 136 Mar 23 08:24 .
drwxrwxrwx 23 mike mike - 884 Mar 23 02:04 ..
-rw------- 1 mike mike - 6148 Mar 23 08:24 .DS_Store
drwxrwxrwx 5 mike mike - 170 Mar 18 09:14 delete.rtf


and

ls -alBR ~/.Trash provides:


total 16
drwx------ 4 mike mike 136 Mar 23 08:24 .
drwxrwxrwx 23 mike mike 884 Mar 23 02:04 ..
-rw------- 1 mike mike 6148 Mar 23 08:24 .DS_Store
drwxrwxrwx 5 mike mike 170 Mar 18 09:14 delete.rtf
/Users/mike/.Trash/delete.rtf:


Hope this helps!

Mike.

Mar 23, 2007 8:04 AM in response to Mike Richards2

Mike

Looking at your last post, the directory "delete.rtf" is obviously corrupt, since it should list at least '.' and '..' as its content, and in fact there ought to be three other entries.

I would start from your Install Disc (CD or DVD) and choose "Disk Utility > Repair Disk" on your startup volume. You'll find Disk Utility on one of the menus, probably the Utilities menu for 10.4. Sometimes this will put things right, or it may just complain about an "Invalid link count" and be unable to repair.

If it can repair, you should then be able to empty the trash from Finder or Terminal.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Help me delete this undeletable Safari download file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.