MacOS – Why does the mac not have free space even after I delete files

hard driveicloudmacos

Today I want to install Catalina but it requires 17 GB of disk space, and I only have 8 GB. So I started to delete files but only found out that the disk space was unchanged or even shrinked more after deleting.

I just delete files either by moving the files to Trash and empty it, or rm -rf. The files are both on local and iCloud.

I deleted at least 40 GB files but the available disk size is still about 8 GB. Why is it happening and how can I gain the disk space?

I restarted a few times but it didn't work…

(This question is not about the external drive.)


enter image description here

I found that there are awkward files under ~/Library/CloudStorage/iCloud Drive, and how many times I delete them these files show up again under this directory.

All of them seem to just a few bytes files according to the Finder information, but deleting them takes a few minutes per one file.

Best Answer

On the assumption that you have APFS file system, macOS 10.14 Mojave, and local snapshots - the system might take some time to purge the space.

The way to know this would be to open the system information and give it several minutes to catalog all the space into buckets.

Second - check for local snapshots

tmutil listlocalsnapshots /

There are command line options to force a purge of APFS snapshots:

tmutil thinlocalsnapshots / $(echo "10 * 1000000000" | bc) 2

If you don't have these, I would suggest making sure you have a good backup and restart to recovery mode and run a disk check to be sure the accounting / filesystem are in good shape.

The next thing to do would be to turn off iCloud and let all those files exist only in the cloud. This will prevent a local storage taking space.

Once you install the upgrade, you can turn on iCloud again and only download the files you need locally.