Can not remove all files from Trash in OS X

1

I am try to empty the Trash, which takes forever. Most of the files have been removed, but I am left with several that will not delete, and I now get the following message:

The operation can’t be completed because you don’t have permission to access some of the items.

The folders and files that remain in Trash cannot be 'Put Back'. How can I remove these files from Trash?

In Terminal, I have typed in cd ~/.Trash then rm -rf ~/.Trash/* but nothing happens. How do you execute a command in Terminal? Do you hit Enter?

I am new to OS X and have never used Terminal before, so I am very wary of how best to proceed. I would appreciate any help you can give me.

I now know that if I 'Move To Trash' individual files and empty folders, the are removable from Trash. However I still need to remove the ones already there.

user82178

Posted 2011-05-20T15:03:49.720

Reputation: 11

If you don't know how to handle a Terminal, typing commands like rm -rf can at worst delete all your files and make the system unusable. Be careful what you enter. What did the Terminal output when you entered the above rm -rf ~/.Trash/*? – slhck – 2011-05-20T15:12:31.133

This user indicated he doesn't know how to submit a command to the shell and the answers he gets suggest he type sudo rm -rf? Seriously? Just two days ago an apparently more advanced user didn't bother to copy/paste a command in an answer of mine and ended up failing, and typos in this case are much more serious.

– Daniel Beck – 2011-05-20T17:51:43.930

Answers

3

There's actually a number of causes of this so the solution varies. Often simply logging out and back in does the trick. If that doesn't work try repairing permissions through the menu. If that doesn't have an effect try Cmd +Option + Shift + Backspace. As a last resort you can also type this into the terminal

sudo rm -rf /.Trash ~/.Trash

Blomkvist

Posted 2011-05-20T15:03:49.720

Reputation: 2 379

2Repairing permissions: good call. – Ian C. – 2011-05-20T15:20:24.843

0

The operation can’t be completed because you don’t have permission to access some of the items.

That's indicative of you not having administrator access to the machine. Does the system ask for your password when you initiate an Empty Trash action from the trash can icon in the Dock? Do you know if you're an administrator on the machine?

How do you execute a command in Terminal? Do you hit Enter?

Yes, you hit Enter to execute what ever you've typed at the prompt. But this is dangerous stuff to be doing if you've never used the command line before.

If you really want to go down this route, you need to prefix your rm call with sudo. Like so:

sudo rm -rf ~/.Trash/*

Be very, very careful with those commands. You can quickly render your machine inoperable with a poorly thought out, sudo'ed, rm call.

Ian C.

Posted 2011-05-20T15:03:49.720

Reputation: 5 383

0

If you're not experienced with the command line you may want to try out BatChmod. It has a handy Force Empty Trash command that does the trick.

http://www.macchampion.com/arbysoft/BatchMod/Download.html

user82218

Posted 2011-05-20T15:03:49.720

Reputation: 1

0

That's the easiest way and it worked for me…

Boot to Windows, install an HFS+ driver software and delete everything inside the trash of OS X. Simple.

samialtas

Posted 2011-05-20T15:03:49.720

Reputation: 1

1Not everybody has Windows installed. Resizing a partition; shutting down Mac OS X; buying and installing Windows; installing drivers; (likely buying,) downloading and installing HFS+ drivers; and then removing those files is possibly not the easiest way. If everything's already set up, maybe, but the user didn't give any indication it was. – Daniel Beck – 2011-05-20T20:32:05.227