iCloud drive syncs files directly to your Mac. Any file that you upload to your iCloud drive from other devices, or even the web version of iCloud can be synced/downloaded to a Mac that’s using the same iCloud/Apple account. On Mac, if you delete a file from the iCloud drive, it will be removed from iCloud as well. If you want to delete the local copy of an iCloud file, but still keep it in iCloud itself, you can do so with a Terminal command. A much easier way to do it is with a Finder extension called iCloud Control.
Delete local copy of an iCloud file
Download iCloud Control, unzip it, and install it. Since it is a Finder extension, you will have to enable it. Open System Preferences and select the Extensions preference. Enable iCloud Control.
Open your iCloud drive and select the file that you want to remove the local copy for. There will be an iCloud icon next to the search bar. Click the dropdown button next to it and select the ‘Remove selected item locally’.
Once removed, you will still see the file but it will have an icon next to it. The icon is the iCloud icon with a downward pointing arrow. If you click this icon, you can download the file from iCloud again. The place holder for the file won’t take up much space on your local drive so it’s nothing to worry about.
iCloud files that are downloaded to your local disk obviously take up space. If you need to keep a copy of a file synced to iCloud, you won’t be deleting it. If, however, you only need to store a file in iCloud, keeping a local copy of it is pointless and possibly a waste of space. It all depends on how much storage space you have to spare. For a Mac with a small SSD, it’s best to keep unnecessary files off your drive.
As mentioned earlier, you can also remove the local copy of a file on iCloud from the Terminal but it is a clumsy process and often, the files don’t come back. Even if you’re comfortable tweaking your Mac from the Terminal, it’s better to use this Finder extension that makes it easier to reverse things.
You may have some files in your iCloud drive that have the iCloud icon and an upward pointing arrow. These are files that are on your system and if you click the icon, it will be uploaded to iCloud.
Source = “https://www.addictivetips.com/mac-os/delete-local-copy-of-an-icloud-file-on-macos/”