I was cleaning up old directories on my 256GB MBPro SSD mounted on /dev/disk1.
was showing the expected increased in available disk space on that Filesystem. However for the last half dozen invocations of "rm -rf 0.1%) change. In fact the entire available disk space slightly decreased.
There is no other substantial work happening on the system - and the Virtual Memory size has not changed.
Now double digit GB of data is quite sizeable. I can not understand how "df -k" could miss / neglect these changes.
Note: I did confirm that the directories being removed by rm -rf are in fact gone. In any case it took minutes to perform those deletions - so it was obvious things were happening.
Here is output before all the "rm-rf"'s:
20:17:50/shared $df -k Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on /dev/disk1 243915264 217388008 26271256 90% 54411000 6567814 89% / devfs 200 200 0 100% 694 0 100% /dev map -hosts 0 0 0 100% 0 0 100% /net map auto_home 0 0 0 100% 0 0 100% /home localhost:/5Lcoijnnqm-dLj_GeL3j-A 243915264 243915264 0 100% 0 0 100% /Volumes/MobileBackups
Here is the output after all the "rm -rf"'s
20:27:28/shared $df -k Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on /dev/disk1 243915264 217450876 26208388 90% 54426717 6552097 89% / devfs 200 200 0 100% 694 0 100% /dev map -hosts 0 0 0 100% 0 0 100% /net map auto_home 0 0 0 100% 0 0 100% /home localhost:/5Lcoijnnqm-dLj_GeL3j-A 243915264 243915264 0 100% 0 0 100% /Volumes/MobileBackups
Here is the du of the parent directory of the ones being deleted before the rm's.
du -d 2 -k > out Last line of out: 58446128 .
So we had 58GB under that parent dir
Here is the du on the parent dir after the rm's:
du -d 2 -k > out Last line of out2: 36830744 .
So: du is working - showing 20GB less. But df is broken
But what does Finder say? Finder agrees with df !
BTW here is "Trash": shows it has been emptied so that is not the issue.
So then - why are the directories removed by rm -rf not being made available back to the O/S?
UPdate I have removed another 20GB for a total of 50GB yet still the same amount of disk space is reflected in both finder and df -k.
** Another update ** It appears that
sudo tmutil disablelocal
may have resolved this. Apparently time machine does local backups: and the deleted files do not really get removed until/unless it (lazily) decides to allow it. Notice it is now 62GB free.