MacOS – Can’t delete folder named __MACOSX

finderfoldershangmacostrash

So, I have a folder in my ~./Trash folder, and I can't seem to delete it. It's named __MACOSX, and I've tried everything I can think of to get rid of it. Finder won't start at all because of it (it starts for a bit at login, but then crashes/freezes), the terminal freezes up when trying to remove it (both as me and as sudo), and it even freezes up when auto-completing (tabbing) after typing the first few characters of it. Any suggestions?

Update: doing a normal ls lists it just fine, but an ls -l to try and find out more about it freezes the terminal:

polaris:~ rob$ cd .Trash/
polaris:.Trash rob$ ls
__MACOSX
polaris:.Trash rob$ ls -l
^C^C

(Pressing ^C doesn't do anything)

Another update: Onyx's trash utility freezes while deleting trash or secure deleting trash, SuperEmptyTrash crashes,

Best Answer

I can think of a couple of things.

First, try deleting everything in your .Trash folder with sudo privileges:

sudo rm -rf ~/.Trash/*

If that fails, then try resetting the PRAM on your Mac. Sometimes doing so can surprisingly fix odd errors.

Finally, make sure that the permissions on your .Trash folder are correct

ls -ale ~/.Trash/

The permission for the folder should be like the following:

drwx------ 24 username staff 816 Mar 24 22:06 .

drwxr-xr-x+ 34 username staff 1156 Mar 24 09:51 ..