APFS VM Volume taking 320 GB of disk space
I noticed my disk usage creep up for no apparent reason for the past few months until I started constantly running out of disk space on my M1 Pro.
Upon further inspection a Volume called "VM" was taking 319,04 GB of space.
$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: Apple_APFS_ISC Container disk1 524.3 MB disk0s1
2: Apple_APFS Container disk3 494.4 GB disk0s2
3: Apple_APFS_Recovery Container disk2 5.4 GB disk0s3
/dev/disk3 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +494.4 GB disk3
Physical Store disk0s2
1: APFS Volume Macintosh HD 9.1 GB disk3s1
2: APFS Snapshot com.apple.os.update-... 9.1 GB disk3s1s1
3: APFS Volume Preboot 4.7 GB disk3s2
4: APFS Volume Recovery 794.5 MB disk3s3
5: APFS Volume Data 119.0 GB disk3s5
6: APFS Volume VM 319.0 GB disk3s6
$ df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk3s1s1 460Gi 8.5Gi 39Gi 18% 356093 406123080 0% /
devfs 204Ki 204Ki 0Bi 100% 704 0 100% /dev
/dev/disk3s6 460Gi 297Gi 39Gi 89% 0 406123080 0% /System/Volumes/VM
/dev/disk3s2 460Gi 4.3Gi 39Gi 11% 831 406123080 0% /System/Volumes/Preboot
/dev/disk3s4 460Gi 29Mi 39Gi 1% 43 406123080 0% /System/Volumes/Update
/dev/disk1s2 500Mi 6.0Mi 480Mi 2% 1 4910400 0% /System/Volumes/xarts
/dev/disk1s1 500Mi 6.2Mi 480Mi 2% 28 4910400 0% /System/Volumes/iSCPreboot
/dev/disk1s3 500Mi 3.5Mi 480Mi 1% 51 4910400 0% /System/Volumes/Hardware
/dev/disk3s5 460Gi 111Gi 39Gi 75% 4205181 406123080 1% /System/Volumes/Data
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /System/Volumes/Data/home
At first I thought it was just swap, but activity monitor and /System/Volumes/VM show no swap being used at all.
$ ls -alh /System/Volumes/VM
total 0
drwxr-xr-x 2 root wheel 64B May 8 15:00 .
drwxr-xr-x 14 root wheel 448B Apr 1 18:46 ..
Restarting, running first aid in recovery mode, nothing seems to shrink the VM volume.
Please assist, would love to avoid having to reinstall Mac OS 🙏
MacBook Pro (M1, 2020)