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

simontarr

macrumors 6502
Original poster
I'm currently migrating 100s of GB of data from OneDrive to iCloud. Unfortunately, I only have a 256GB hard drive on my MBA, so I'm having to move data in batches; download 50GB or so of data then right-click -> Remove Download in Finder once the transfer has completed.

I realise that you can right click on a directory and select 'Remove Download' to speed up local remove, but I've found this to be rather patchy - some files are removed locally, others aren't. I can't seem to detect a pattern as to which files are removed and which aren't (running Monterey 12.1) In large directories, I have to therefore scroll through all the files and remove downloads in batches - a really slow and tedious process. It seems that you can't CMD+A -> Remove Downloads; if there's just a single file that's already been uploaded to iCloud, then the remove download option in Finder is unavailable.

I was wondering if there's a Terminal script I could run which will remove all files from my local machine which aren't already on iCloud?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.