Local snapshots beef up the disk space of your mac. If the diskspace is marked purgeable but isn't freed when you empty the trash, chances are high, that local timemachine snapshots are using it.
- Open the terminal
- List the disks and partitions number using
diskutil list
. - Watch out for disks marked as synthesized and the partitions of type APFS Container Scheme
- The
PARTITION_IDENTIFIER
used later on, is composed of disk concatenated with the disk number, an s and the partition number. So for the followingdiskutil list
output it would bedisk4s1
:
/dev/disk4 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +499.9 GB disk4
Physical Store disk3s2
1: APFS Volume VM 403.2 GB disk4s1
If you want to clean your main disk, it's most probabely disk1s1
. So replace all subsequent PARTITION_IDENTIFIER
with disk1s1
.
- List the snapshots of the given partition:
diskutil apfs listSnaps PARTITION_IDENTIFIER
- Delete those snapshots:
diskutil apfs deleteSnapshot PARTITION_IDENTIFIER -name SNAPSHOT_NAME
- Reboot your system (or remount the disk, if you can)
To delete all local snapshots of a certain partition at once run:
diskutil apfs listSnaps PARTITION_IDENTIFIER | grep Name | sed -E 's/\|?[[:space:]]+Name:[[:space:]]+//' | xargs -I % diskutil apfs deleteSnapshot PARTITION_IDENTIFIER -name %