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.

Can't delete __MACOSX

Hello,


I have a really crazy folder structure in Trash, consisting of a lot of __MACOSX.

I have tried what I have seen on this site, nothing worked.

Resetting NVRAM(cmd+opt+p+r) changed nothing.

When I booted into single-user, I got error saying about readonly file system.

In standard multi-user mode, even with sudo I had no rights to .trash folder. (rm -rf, ls)


It is true, I previously ran into a nightmare related to parallels virtual machine. Windows started lagging, then definitely crashed. I was totally unable to do anything(including delete) with the VM folder, until I reinstalled the whole macOS.


So I just hope I don't have a defective SSD. Good thing is, I am not experiencing kernel panics or i/o failures.


Thanks in advance,

Stanislav

MacBook Pro 15", macOS 10.15

Posted on Dec 14, 2019 10:02 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 17, 2019 10:06 AM

The trash bin you are dealing with is the one for the Home folder. There are trash bins for folders and disks. The are a couple of support articles that may help: Can't empty the trash after deleting backups via the Finder and My Mac Won't Empty the Trash | Easy PC Tutorials. This little utility may also help: Trash It! 5.1.


I did a search about this item which appears to be an artifact of zipping files. I found this solution for a user whose problem is like yours:


Move it to Desktop. First, do a back up of your files. Then, reboot your Mac into single user mode (Command and S buttons during boot). You will be a root user, so do this:


cd /
cd ~/Desktop
sudo rm -rf __MACOSX
reboot


Can't hurt to give it a try.

Similar questions

8 replies
Question marked as Top-ranking reply

Dec 17, 2019 10:06 AM in response to maskrtnik01

The trash bin you are dealing with is the one for the Home folder. There are trash bins for folders and disks. The are a couple of support articles that may help: Can't empty the trash after deleting backups via the Finder and My Mac Won't Empty the Trash | Easy PC Tutorials. This little utility may also help: Trash It! 5.1.


I did a search about this item which appears to be an artifact of zipping files. I found this solution for a user whose problem is like yours:


Move it to Desktop. First, do a back up of your files. Then, reboot your Mac into single user mode (Command and S buttons during boot). You will be a root user, so do this:


cd /
cd ~/Desktop
sudo rm -rf __MACOSX
reboot


Can't hurt to give it a try.

Dec 14, 2019 12:20 PM in response to maskrtnik01

Try using this command:


    sudo rm -Rf ~/.Trash


Press RETURN. Enter your admin password when prompted. It will not echo to the Terminal window. Press RETURN again.


If the above isn't a solution, then try this:


Fix permissions on Trash folder


Select your Home folder and press COMMAND-I to open the Get Info window. Be sure you have "read & write" privileges in the Sharing & Permissions panel. Check under "General" panel to be sure it isn't locked. If that is correct, launch the Terminal on the Utilities folder, and at the prompt copy and paste this command:


mkdir ~/.Trash


Press RETURN. If you get a message that the folder already exists, copy & paste this command:


sudo chown $UID ~/ .Trash


Press RETURN. Enter your admin password (it will be invisible) Press RETURN. Then copy and paste this command:


chmod u+rwx ~/.Trash


Press RETURN. Log out and back in, or restart.

Dec 17, 2019 10:39 AM in response to Kappy

You're right, this all started with zip files.

I had only a little success wiping them inside trash.

Wiping them inside another folder worked.


Thanks for your time.


Small note for others, in single-user environment, I got errors about r/o mount. Standard boot worked - but don't try to delete them from GUI, this just moves them back to trash. rm -rf them. If doesn't work, try disabling SIP.

Can't delete __MACOSX

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