MacOS – Disk space not freed up after deleting files and emptying Trash

deletingdisk-spacemacos

I had approximately 50Gb of Windows VMs on my MacBook Pro internal SSD (128Gb) (OS X 10.7.3).

I copied them to an external drive, then deleted them from the internal drive, then emptied the Trash.

When I look at disk usage in Activity Monitor it shows the same level of usage as it did prior to deleting 50Gb of files.

Any ideas why the space hasn't been freed up?

Best Answer

The answer relates to changes to Time Machine backups in Lion.

My understanding is that when a TM back up is attempted when the back up disk is not connected, a back up is made in /Volumes/MobileBackups.

These back ups do not go away the next time TM runs with the back up disk connected. I am not sure if the OS will eventually reclaim this space.

You can disable the local back ups by running one of the following commands (depending on your version of Mac OS):

sudo tmutil disable localsnapshot

# for older versions:
sudo tmutil disablelocal

After you run this command /Volumes/MobileBackups is deleted.

I'm sure there is a good reason for the local backups and I don't necessarily recommend disabling them, but they were - in combination with some large deleted folders - the cause of disk space appearing to be still in use.

You can re-enable mobile backups by running:

sudo tmutil enablelocal

More info here - http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars/18