You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

How do I delete "__MACOSX"?

After unzipping a file, I have managed to get stuck with a folder named '__MACOSX' which I can't delete. Whenever I drag it to the trash and try to empty it, the trash can just hangs. I've Googled it and this is what I've tried so far...


Holding Option whilst clicking 'Empty Trash'

I've tried opening Terminal and using:

  • "sudo rm - rf ~/.Trash/*"
  • Tried dragging the file out of the trash and deleting it using "sudo rm -rf __MACOSX"


And each time, terminal just hangs. Could anybody else out there help me get rid of this folder pleaaasssseeeeee?? 😀

MacBook Pro, Mac OS X (10.7.2)

Posted on Jun 4, 2012 10:58 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 4, 2012 11:21 AM

Drag it to the Trash, open Trash and go to Finder > Secure Empty Trash

11 replies

Jun 4, 2012 12:10 PM in response to mende1

Thanks for the response mende1, but that didn't work, it calculated the number of items to delete. And then counted down to 0. And then started going into minuses. Odd one that. In fact I've added a screenshot, because I don't know what to make of it.


User uploaded file


dominic23, I have already Googled the issue and the solutions being offered were those that I have tried in the terminal windows (and an app called 'Trash It!' which also didn't work). The __MACOSX folder isn't in a zip, it's the result of an extracted download. As well as this all results suggest what I have tried in the initial post, or how to avoid creating it when creating a zip - and I'm not trying to create an archive, I'm trying to get rid of it.


Any other suggestions would be much appreciated!!


(Since I've taken that screenshot it has hit -436 and counting. And still hasn't got rid of the folder)

Jun 4, 2012 12:40 PM in response to mende1

Whoa! That's a pretty bad set of commands! There's absolutely no need for "cd /" or "sudo reboot". For that matter, "sudo reboot" really doesn't make much sense... it doesn't take root priviliges to reboot, and if rebooting were actually necessary, it would be better to just choose Apple -> Restart. And I'm not sure why you think it's necessary to move the folder to the desktop before doing any of that.

Jun 4, 2012 12:46 PM in response to adrian-polglase

Since you're seeing obviously nonsensical progress info when secure emptying the trash, I would be concerned you may have a corrupt hard drive. Try restarting in recovery mode (hold down command-R at startup). Once there, select the Disk Utility option, and repair the hard drive. If there are any problems that can't be repaired, you'll need to bring out the bigger guns... try something like DiskWarrior.


If the disk checks out okay, let's just nuke your trash folder entirely. This is dangerous stuff, so be sure that you copy these commands verbatim and paste them into the Terminal. Don't try to re-type them in the Terminal. A single typo could cause you to erase the entire hard drive. And it should go without saying that you need to have a good set of backups before doing anything like this.


All that said, here goes... cross your fingers and toes! Paste the following command into the Terminal:


sudo rm -rf ~/.Trash


Enter your password at the prompt, and don't be surprised that it doesn't show anything when you type. Then wait until you get a new $ prompt. Once that happens, quit the Terminal and log out of your account, then log back in. (Or restart the computer.)


Let me know if none of that works.

Jun 5, 2012 3:51 PM in response to adrian-polglase

Thanks for the responses. I decided to try them in order, and found that mende1's solution worked. To be fair, it did look terminal froze again and ironically the folder only disappeared after I admitted defeat and closed Terminal. Odd.


I didn't think it was a corrupt hard drive, as I've experience no odd performance quirks, noises and the trash still emptied as long as the __MACOSX folder wasn't in it. It appears to be an odd quirk of the operating system methinks. But thanks Thomas for the response anyway - you have all been incredibly helpful!!

Jun 5, 2012 4:11 PM in response to adrian-polglase

I decided to try them in order, and found that mende1's solution worked.


It worked, but it was more awkward than it needed to be and revealed a lack of familiarity with Unix that is concerning in conjunction with one of the most dangerous commands you'll ever use (sudo rm). I say this not to insult mende1 - who was, after all, just trying to help - but as a warning about the dangers of using Terminal commands. Many people giving out such tips may just be copying them from elsewhere without fully understanding them, and may not get it quite right. As I mentioned earlier, a very small error in a sudo rm command can erase your entire hard drive. I've seen it happen.

How do I delete "__MACOSX"?

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