Anytime I've run up against this in the past, I was always able to figure it out, and usually via the command line. I'll list all the commands I tried so far, followed by other things I've tried below that.
Commands I've tried so far, and were also ran as root
using sudo su root
:
rm -rf <folderName>
rmdir <folderName>
ls -@RelO
(shows folder is empty)ls -Rail
(shows empty)ls -ri
(shows empty)xattr
(I finally removed the extended attributes of this folder, asls -la
showed an@
at the end of the permissions.drwxr-xr-x@ 3 mike staff 96 Jan 23 23:29 iPhoto Library
As mentioned, in addition to these Terminal commands, I...
- Booted into Safe Mode (still says "Directory not empty")
- Booted into Recovery Mode, then ran
csrutil disable
to turn off System Integrity Protection, and rebooted as normal. Then, from Terminal (again, viasudo su root
), ran all of the same commands. It keeps saying "Directory not empty". - Booted into Single User mode, navigated to the folder, and ran the above commands (was sure this would work). It still reads, "Directory not empty"
- Not copied, but moved this to a thumb drive (command key + drag to volume), a message read, "Was able to move folder, but can't delete existing one".
You may have noticed this is my old iPhoto Library file. Just so you know, I've finally (after many years) consolidated my newer "Photos" library, so I wanted to get rid of this, as it's almost 90 GB. And yes, I did 'right-click' to "Show Contents", then was able to get rid of everything inside of this folder, but can not get rid of the top-level folder.
I have never been stumped like this (I'm a Mac tech for 23 years). This is quite the forced feeding of some seriously humble pie.
lsof +D [dirName]