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

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

Hey guys, I keep getting this error when I try to empty the trash. There's a folder that I haven't been able to delete for few months now. How can I empty the trash?


Please help me.

Posted on Mar 27, 2014 10:27 AM

Reply
64 replies

Apr 6, 2014 4:14 AM in response to NewbMacUser

NewbMacUser wrote:

Hey guys, for some reason I'm still unable to delete these certain folders even when I run the sudo rm -rf ~/.Trash/* command in Terminal.

If you are determined to use the Terminal remove ("rm") command, please refer to the Archived - Troubleshooting permissions issues in Mac OS X article I mentioned earlier. Scroll down to the section titled "Emptying the Trash." Read everything in that section carefully, including the two warnings, before you try anything. Remember that there is no undo for this command & any typos can be disastrous.


I suggest you try the first (six step) approach mentioned. Note that in this method, you open the Trash folder, select all the items in it, & drag them into the Terminal window after adding a space after the sudo rm -rf text. This probably will produce a lot of text since there will be a full path name for each of the items. Don't worry if there are backslashes in the names; with the drag method Terminal is smart enough to add them where needed. If everything looks right, hit return.


This method differs from the others in that it doesn't use the "wild card" character (the asterisk), which matches every file name in the file path, so it is somewhat less dangerous than the ones that do.


If that doesn't work, you can try the sudo rm -rf /.Trashes/ or

sudo rm -rf /Volumes/<volumename>/.Trashes/ commands.


The second one is probably what you need, but you must be careful to use the properly escaped or quoted form of the "volumename" if there are any spaces in that volume's name. One way to do this is to precede any spaces in the volume's name with a backslash (the "\" character). As an example, if the volume's name is "NO NAME" then the escaped form would be NO\ NAME


If you don't understand how to do this, STOP. Don't use this command!

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

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