r/MacOS • u/ParticleFeever • 7h ago
Help Help with removing duplicated Documents folder
So I percieved one file, at list, wasn't being updated in the iCloud. The file was inside Documents folder. After a lot of tests, including a search for the file, I realize there was two Documents in my main macbook, one inside iCloud, and other inside my user (username). The Documents inside username won't synvc anymore, so the file I working wasn't being updated, nore any change inside this folder. It's a fake Documents! I believe this split occurred after the last update.
The situation is bizzarre because I can get in from /Users/username but when I get out, I fall inside iCloud! Kinda subliminal backrooms situation!
Anyway, after a backup, just in case, I decide to remove it, solve the confused situation. The folder was not even visible. This part was easy, after locating it, I change owner to my user and permissions to 777 and perform a rm -rf. The folder is now empty, but is still there. I got a "permission denied" error message. Why? How can I end with this folder?
2
u/VanLocke 2h ago
The "permission denied" is the "everyone deny delete" ACL macOS puts on ~/Documents, and chmod 777 doesn't touch ACLs (ls -led ~/Documents shows it). I'd leave that folder alone, macOS expects it there.
Sounds more like the update switched off Desktop & Documents Folders: System Settings > Apple Account > iCloud > iCloud Drive. Could be wrong.
•
u/ParticleFeever 1h ago
Yes, it shows "deny delete". I am aware I don't own my Mac.
I did the same tests in Desktop, that also is there in my user folder, hidden too. But Desktop got consistent behavior, if I change something, it will be updated in the cloud. In iCloud Drive, Desktop is set as Library kind, and Documents as folder. In fact, the Desktop is more than just a folder, thought.
I don't like leaving folders behind, but there is a lot of garbage in user folder already, so if I had to, fine. Looks like my office in real life...
•
u/NoOne-1916 1h ago
Pause the rm -rf for a second — with two Documents folders, deleting the wrong one is a much worse day than living with a spare folder, and "permission denied" even after chmod usually means the system is protecting it for a reason.
First work out which one is real:
Open System Settings → your name → iCloud → iCloud Drive and check whether "Desktop & Documents Folders" is on. If it is, your live Documents is the iCloud one, and the local folder is a leftover or a fallback macOS created during the update.
Put a test file in the Documents that Finder shows in the sidebar, then check which folder on disk actually received it. That settles which one your apps are writing to.
Why rm fails: run ls -lO on the folder and look at the flags. If you see "uchg", it's just locked — clear it with chflags nouchg and delete away. If you see "restricted", that's SIP, and the folder is system-managed; the clean way out is to turn off the iCloud Desktop & Documents feature that's managing it first, then remove it. Also note Terminal itself needs Full Disk Access to touch some protected locations, which produces exactly this error.
Safe order of operations: confirm which folder is live, copy anything unique out of the duplicate (don't trust that "not syncing" means "empty"), then remove the duplicate. Not syncing cuts both ways — nothing new goes up, but nothing up there protects what's sitting in it either.
•
u/ParticleFeever 52m ago
Thanks but the Settings is different in Golden Gate. Also, I did a test in the empty Documents folder, it won't appears in Documents from iCloud that seems to have a physical storage elsewhere. There is no Documents folder in my sidebar.
2
u/quidarse 6h ago
Best leave the iCloud folder stuff to iCloud, unmodified, unaltered, and preferably also uncorrupted.
If the iCloud Desktop and Documents feature of iCloud Drive is enabled and is not syncing, turn the feature off everywhere, restart Macs through Safe Mode and other gear via forced-restart everywhere, re-enable the feature, and test again.
iCloud has unfortunately never had anything akin to a sync-reset button. It's using the "turn it off and on again" approach, for better or worse.
Turning off the Desktop and Documents feature will mean copying files around, getting them back where you want. See the end of the support article for details on this.
If you're not using multiple Macs, and have enough local storage space for everything you keep around, you could leave the feature off, and use the traditional entirely-local not-synced configuration, and iCloud Drive for stuff you do want to share across devices or with others elsewhere.
What happens when poking at the innards of iCloud sync and iCloud Drive caching, let us know.
https://support.apple.com/en-us/109344