Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Cannot remove stubborn file from trash

I have a problem with a very stubborn item in the trash that will not be removed. This is a zero kb folder that when using different trash methods, often indicates input/output error. It slows the whole system whenever selected or otherwise being used e.g. for trashing etc...

I have tried:

empty trash

secure empty trash

force empty trash

Trash It! utility (from trash can and from desktop)

sudo rm -rf ~/.Trash/<file_to_delete>


Nothing doing. I first noticed a problem when doing a routine repair permissions. This was very slow and finished up by listing a number input/output errors in image png files in an images folder inside a dictionary package (Oxford English.dictionary). I trashed the .dictionary package (and restored from an earlier Time Machine version which seems to work fine). However, I could not remove the offending package from trash. After all the above efforts I am left with just one empty folder; this was called 'images' but is now just a jumbled name of letters and numbers. Repair permissions no longer signals any input/output errors but is still slow to complete.

Any suggestions or help appreciated...

Thanks

Posted on May 22, 2013 5:18 AM

Reply
Question marked as Best reply

Posted on May 22, 2013 6:24 AM

Could be a locked file. Try this...

Copy & paste this command at the prompt in Terminal and press return.

sudo chflags nouchg ~/.Trash/*

You'll be asked for your password, it will be invisible. Enter it and press return.

Then delete the file.

13 replies

May 22, 2013 9:33 AM in response to putnik

@ putnik: most advice in link tried or doesn't apply. Will try the chflag suggestion although the folder says it is unlocked. As I mentioned it seems more than that, there is something wrong with the file - it upsets the system whenever accessed.


@Csound: yes, several times. just won't budge. In fact everything I have tried several times.....


Thanks for the ideas.

May 22, 2013 10:58 AM in response to macjack

You wrote...

sudo rm -rf ~/.Trash/<file_to_delete>


Have you tried rebuilding the Trash itself? That usually blows away anthing...


At the prompt, copy and paste this command

sudo rm -rf ~/.Trash

Press Return.

You will be asked to enter your admin password. It will be invisible.

Enter it and press Return.

Log out and back in or restart.


May 22, 2013 11:18 AM in response to macjack

Hmm... its now looking ominous.

On a suggestion from the web, I tried to go to Single User mode to try emptying trash again. After the grey apple, the spinning wheel went on and on then finally the computer switched off. Now, even for a normal startup without pressing any keys, it appears to be trying Single User again (with time slider) and does the same thing - switch off after a minute or two. So no more access to my desktop, files etc..


A single poisonous file causing all the trouble? Failing HD (Grraaah, pray not....)??


It will however go into Recovery mode (command - R)... not sure what I'll do now (650GB of Time Machine to restore).

May 22, 2013 12:13 PM in response to macjack

Thanks for reminding me. But it didn't work, selecting the Mac HD just did the same thing and closed down.

It will however open in Safe Mode command-S, but will only shut down the machine on exit. On exit, the text comes and goes too fast to see it all, but it signals errors at least one of which is I/O error - which is the same as that thrown up by that problem file/folder.


In Recovery mode, Disk Utility will start repair disk, then gives up - saying to restore from back-up. Not looking hopeful.


Do you know if a complete restore from Time Machine will reformat the drive at the same time?

May 22, 2013 12:23 PM in response to C Nugent

It won't reformat the drive, as you can is Disk Utility, but it should restore it to whatever condition it was when the backup was made.


Unless someone else can come up with a better suggestion, you can erase the hard drive, which will reformat it, reinstall the OS, and then restore from Time Machine using Setup Assistant.


Note that erasing the hard drive will remove all files.

May 23, 2013 5:15 PM in response to Eric Root

24 hrs work later, I am up and running again (reformat, reinstall OS, restore all from TM). So far so good: empty trash, permissions OK, disk verify OK. Only problem was Adobe licensing, but solved that with some effort.


Question for the experts here: can a single lethal file like that be a cause of such difficulties or was it more likely a symptom of some underlying problem?


Thanks for your suggestions, even though the solution turned out to be more radical than I expected.

Cannot remove stubborn file from trash

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