defaults read com.apple.screencapture location returned the literal string ~/Library/Mobile Documents/com~apple~CloudDocs/Screenshots Mac. macOS does not expand ~ in this preference, and the folder also did not exist. Invalid path = silent fallback to Desktop. This explains every screenshot landing on the home screen./Users/samaguiar/Library/Mobile Documents/com~apple~CloudDocs/Screenshots Mac and moved all 116 Screenshot * files from ~/Desktop into it. Desktop now has 0 screenshots; destination has 116; iCloud confirmed syncing up.defaults write com.apple.screencapture location rewritten with the absolute path, SystemUIServer restarted, value read back and path validated as an existing directory.~/Documents/Projects/admin/file-ops-logs/screenshot-desktop-cleanup-2026-06-04.txt. Rollback is mv each listed file back to ~/Desktop/. Reverting the setting: defaults delete com.apple.screencapture location restores the macOS default (Desktop).defaults on the host. (sandbox: desktop-commander fallback, cowork host-control case)Task complete.
defaults read com.apple.screencapture location and check the path is absolute AND the directory exists. Literal ~ in this pref is the classic failure. Always write it with $HOME expanded.~/Pictures/Screenshots is the alternative.Importance: Low. Tasks: mark done.
Sam chose all three self-audit follow-ups (local folder, rename, drift guard). Final state:
/Users/samaguiar/Pictures/Screenshots (no longer the iCloud folder, which was created then emptied and removed). defaults read com.apple.screencapture location confirms the absolute local path. Avoids iCloud storage use and sync delay.