Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Killerbob

macrumors 68000
Original poster
Jan 25, 2008
1,916
664
OK, I may have done something stupid, but I need help to get out of the situation:)

I backed up my users folder, so I could do some cleaning up. I quickly realised that this was the wrong way, so I deleted the folder I had created in the copy process.

Now I have a folder sitting in my Trash, which I cannot get rid of. It contains the folder "Mobile Documents" which is in the users Library folder, and it has about 50 folders in it. No files, just empty folders, some with more empty folders.

When I try to empty my Trash, I get the message that the files are in use.

I have tried a bunch of things;

1) rebooted and tried again,
2) in terminal I used "cd ~/.Trash", and then "rmdir -r FOLDER", but I get the message that it is an illegal option,
3) in terminal I used "lsof" and then dropped the folder in there, but I do not get a list of what app has got the files open,
4) in recovery mode, I ran First Aid.

And nothing has worked, I still cannot get rid of that folder or its contents.

What to do?
 
try deleting the file/folder via terminal, put it back to its former location
sudo rm -rf and drag the folder into terminal
 
I can't either. Gives me this message.The operation can’t be completed because an unexpected error occurred (error code -8060). I hear the trash being empty but the trash can stays full. if you open the trash can and select Delete Immediately it works
 
try deleting the file/folder via terminal, put it back to its former location
sudo rm -rf and drag the folder into terminal

I get the message that the Directory not empty - even though they are (I checked for hidden files also...). Also I had tried that before.
 
Isn't that essentially the same as turning of SIP, which I have tried?
 
Could this have something to do with how Catalina now uses two partitions. One looks normal. The other has the same name but also the word data at the end. If you look in disk utility you’ll see. I noticed some strange behavior when looking for an app in the applications folder. It wasn’t in there but it opened when I used spotlight. After digging around I found there are two app folders in similar but different locales. When I went to “get info” one says applications the other says previous content\applications. It’s weird and I’ve not seen this before.

Not saying this is related to your issue but it may be in some way
 
Isn't that essentially the same as turning of SIP, which I have tried?
As you are trying to delete user files, disabling SIP and mounting the system as writable should not be necessary.
Try from Terminal in Recovery
cd /Volumes/Macintosh\ HD\ -\ Data/Users/YourUser/.Trash
rm -r folder
Or make another admin user, log into the new account and try to delete from there.
 
Good suggestions, except you cannot see the .Trash folder from another user account - it is not a “permanent” folder.
 
Good suggestions, except you cannot see the .Trash folder from another user account - it is not a “permanent” folder.
Sure you can see it, you can even delete it from Finder. Here is the admin user test looking at another user's files.
trash.jpg
 
OK - so I can see it, but I can't delete it from Finder (I do not have access), and I can't do it from Terminal either...
 
I tried disabling everything to do with iCloud, and yet macOS still keeps these folders locked. There are no files in them to be locked, hidden or otherwise, yet still I can’t empty the Trash.
 
LOL - I did that, and it ruined my Catalina installation to the point that I could not boot into Catalina. So I restored from Time Machine, and now all is back to normal again...

Funny thing, the undeletable folder in my Trash is now gone - so I guess it worked... :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.