35

I had approx 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 c 50Gb of files.

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

  • How long have you waited until you rechecked the available space? – gentmatt Mar 18 '12 at 6:34
  • Do you use Time Machine? – Kyle Cronin Mar 18 '12 at 11:41
  • Be extremely careful with the rm -rf command, as typing sudo rm -f will delete EVERY file on your system and all connected volumes! Speaking from experience with making a typo with a similar line – Ryan Nov 12 '17 at 22:20
36

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 the following command:

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

  • When mobile backups are on, does the disk space taken ever get freed (e.g. when it can be written on an external drive)? Or does it stay permanently? – Szabolcs Aug 8 '13 at 15:07
  • 1
    I think it's worth noting that (at least in certain cases, it worked for me), just disabling Time Machine by flipping the big switch in TM preferences will free up that space. I started a backup that didn't finish, and only when I disabled TM entirely did I get my 50+ GB back. – Aidan Miles Nov 26 '15 at 5:20
  • THis doesn't go the point of why deleting 50GB of files unrelated to TM backups is not freeing up Drive space. I have same problem as OP. – wide_eyed_pupil Apr 23 '17 at 18:08
  • $ sudo tmutil disablelocal disablelocal: Unrecognized verb. – gies0r Nov 12 at 12:58
14

On Mojave 10.14.4 I was able to reclaim 50GB of space with:

sh-3.2# tmutil listlocalsnapshots /
com.apple.TimeMachine.2019-04-03-103122
sh-3.2# tmutil deletelocalsnapshots 2019-04-03-103122
Deleted local snapshot '2019-04-03-103122'

Local snapshots are typically created during Time Machine automatic backups. It is not clear why this local snapshot was created, because automatic backups are disabled on my Mac Book. One possibility is that Mojave upgrade automatically made that snapshot.

10

On High Sierra the command will be: sudo tmutil disable localsnapshot.

4

Sometimes the deleted content gets held in the .Trashes folder in the root directory. From the Terminal you can cd /.Trashes and see if any of your deleted files are still in the Trash. You can then remove them via sudo rm -rf someFolderName.

Caution: this is a rather advanced user operation so be careful what you type and what exactly you remove since rm is permanent and can't be undone.

4

Just switching off Time Machine in Time Machine Preferences (and switching it back on) fixed the problem for me.

2

If you look the free disk space from finder it will not include the backups on space used. That is because backups will be deleted if more space is needed by other apps. What I do to keep the mobile backups working without taking much space, is disabling and enabling the time machine once per week (from TM prefs). When you disable it the local backups are deleted.

I guess it wouldn't make much difference to just let the drive get full and then automatically delete backups as needed (maybe slightly slower performance?).

1

If you delete a file, as long as some application has a hold on it the file will not be freed from the filesystem. That's why you can play a movie and delete it while playing and still watch it until the end, presuming you don't pause it (which may even work too).

This is also perhaps why Time Machine related answers are popping up. If Time Machine is in the process of backing up your jumbo file that will take a good long while, and until it finishes the file will not be deleted from the system. You can "Skip backup" to resolve the problem immediately.

  • I manually deleted a mysql ibdata1 and restarting the mysql server solved the issue. Thanks. – maxm Jun 3 '16 at 20:54
  • 1
    nah. I'm deleting DMG files 5 GB and not mounted and no freed disk space at all. and a bunch of other files. OS X is doing something weird here I'm sure of it. – wide_eyed_pupil Apr 23 '17 at 18:11
0

First try to restart your mac, then run the Disk Utility app. It will re-calculate your HD available space and show the correct numbers on Finder immediately

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .