Surprise! Surprise! Ventura unable to install on my Mac Mini M1, lacking about 6 GB of free space. I’ve got a large file on my desktop that I can delete, but I’m not getting the right command, to my humble knowledge, inside my bash 3.2 Terminal:
At the rm command, nothing happens. I’ve searched Apple, Google, and YouTube. Can you help?
Yes, those darn snapshots! Even if you delete a big file, the original still remains in a snapshot, and the space is not really released until all the snapshots referencing that file are removed. Obviously Apple thinks all users have unlimited capacity on their boot devices.
I have a different opinion. Obviously Apple thinks that users will find more utility in being able to retrieve data modified in the last 24 hours directly from the Time Machine-protected disks than to have to restore it from an external Time Machine backup disk.
A snapshot is a point-in-time view of a APFS volume. They take no space until you write to the main volume. When that happens, extra disk space is required to maintain the point-in-time illusion. And if you have multiple snapshots, APFS has to take into account what data has changed between those snapshots to maintain the illusion.
Multiple snapshots is where you can get into trouble, especially if you mix using use a third-party utility to orchestrate snapshots (CCC) with Time Machine Time Machine only keeps on-disk snapshots for up to 24 hours in order to speed recovery. macOS will delete Time Machine snapshots if it decides it needs additional space.
However if you mix Time Machine with third-party orchestrated snapshots (CCC) all bets are off. Deleting a Time Machine backup may not release as much space as you think if other snapshots (including CCC snapshots) need that space to maintain the point-in-time illusion. You are responsible for releasing the third party snapshots and the space that they may be consuming, as macOS will not do that for you.
Obviously there are corner cases here, and those depend on how much and how quickly you are writing to an APFS volume.
Once you get to Ventura, a not-too-well publicized feature is that you have some more options for how often Time Machine takes backups. Ventura now allows you to configure automatic backups on an hourly, daily, or weekly basis, or no automatic backups at all. That will control the number of snapshots and may be useful for those users that write massive amounts of data to their volumes configured for Time Machine protection.
And yes, individual files in APFS snapshots can’t be deleted as the snapshots are read-only.
Delete any APFS snapshots of your Time Machine protected disks (such as your boot disk) first the following command:
sudo tmutil deletelocalsnapshots /
Then delete the offending files in your home directory.
Do not touch your Time Machine backup destination disk with Disk Utility. Those snapshots are your backups and deleting them again “would be bad”. Your backup disk also doesn’t count in the space requirements for a macOS upgrade.
Just note that there is one snapshot on an APFS boot disk that can not and must not be deleted. It’s the snapshot of the Macintosh HD APFS volume (not the Data volume) that represents the Sealed System Volume. It doesn’t take any space. You don’t delete it because macOS boots from that read-only snapshot volume. Deleting it “would be bad”.