
I had a folder in Monterey Beta 12 that I could not delete, but this can happen any any macOS version. What happens from time to time is when trashing apps or doing updates a file will still be locked or linked to the original path or filename. This happened to me recently when I updated X11 on my Mac Mini M1. I tired the normal way of removing files but nothing would work. Here are some of what I had tried to no avail:
In this case the file I wanted to remove was in my .Trash folder: /Users/andy/.Trash/Previously\ Relocated\ Items
- sudo rm -rf /Users/andy/.Trash/Previously\ Relocated\ Items/X11
- sudo unlink /Users/andy/.Trash/Previously\ Relocated\ Items/X11; sudo rm -rf /Users/<user>/.Trash/Previously\ Relocated\ Items/X11
None of these would work, I even tried removing immutable thinking maybe it was an extended attribute thing. The only thing that would work for me was to boot it in recovery mode. The MacMini M1 is a bit different then prior systems as you will see below:
- On MacMini M1
- Shutdown
- Power on; holding the power button. Usually take 15sec or so but you will see the log come up then you can release.
- Click on Options
- Login
- On title bar:
- Find Security …
- Click on “unlock disk”
- Open Terminal
- cd /data/Users/<user>/.Trash
- rm -rf Previously\ Relocated\ Items/X11
- Find Security …
Thats it, now you can restart and your docs will be gone, thanks for playing!