56

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?

  • 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
  • 1
    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

12 Answers 12

45

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

| improve this answer | |
  • 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
  • 2
    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
  • 1
    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
  • 4
    $ sudo tmutil disablelocal disablelocal: Unrecognized verb. – gies0r Nov 12 '19 at 12:58
34

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.

| improve this answer | |
  • I've got a list of about 25 of these, so thanks for this insight! Now... is there an easier way to delete them all than typing out the date in the file name individually for every one? – GreatBlakes Jul 28 at 0:41
  • Wow 730GB more storage now. Thanks. – pgee70 Jul 28 at 11:25
  • 1
    @GreatBlakes, this should remove all local snapshots for you.. for SNAPSHOT in $(tmutil listlocalsnapshots / | egrep '[0-9]{4}\-[0-9]{2}\-[0-9]{2}\-[0-9]{6}' -o | tail -r); do tmutil deletelocalsnapshots $SNAPSHOT; done – Molomby Aug 15 at 8:01
13

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

| improve this answer | |
5

Launch the app System Information.

Then select Window > Storage Management.

This will launch a utility designed for managing and observing storage.

Critically, this screen seems to refresh the system disk space calculations. The free space shown in Disk Utility immediately went down.

https://support.apple.com/en-us/HT206996

Storage Management

| improve this answer | |
  • 1
    As of Catalina, the easiest way to launch this util is Apple > About this Mac > Storage > Manage. Opening it didn't help me reclaim my missing space, however – Jason Campbell Sep 24 at 7:24
  • Although this does correctly calculate free space, for me this approach did not refresh Finder with the correct amount of space available, so I could still not perform an action I was trying to complete as it claimed I did not have enough space despite freeing a few hundred GB more space than it needed... – Kendall Helmstetter Gelner Nov 6 at 23:48
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.

| improve this answer | |
4

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

| improve this answer | |
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?).

| improve this answer | |
2

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.

| improve this answer | |
  • 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
1

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

| improve this answer | |
  • None of the other recommendations worked. Restarting seems to have triggered a background process that took a few minutes to run and eventually the actual free space was listed. – Abhi Beckert Jun 7 at 23:04
0

Had the same problem on MacBook Pro mid 2014. Did backups - nothing. FirstAid reported problems, repaired via Recovery, still space not claimed. Reinstalled MacOS via Recovery - free space increased from 24 to 120 GB. TaDa. Happy.

| improve this answer | |
0

This happened to me on Mac OS Catalina. I copied ~100GB from internal HD to external HD, deleted the 100GB on the internal HD. I allowed Time Machine to back up everything (internal and external). Still, the Finder shows no change in available disk space.

What worked:

  • I went to Apple Menu -> About This Mac.
  • I selected the "Storage" tab.
  • It calculated for a while, and kept increasing the available disk space until the numbers were correct.

Unfortunately, the Finder was a bit "more right", but still off by quite a bit, even after several hours. After a while I rebooted (for an unrelated event), and when it came back the Finder was correct.

| improve this answer | |
0

This happened to me on Mojave, specifically with an APFS-formatted 512GB SSD with an extra volume besides the main one. After deleting many GB of files, almost no space would be freed. I don’t use Time Machine, and the handful of local snapshots I somehow had weren’t very large. Several other solutions also didn’t work.

What worked for me was repeatedly adding and deleting a volume reserving nearly all the “available” space, which appeared to trigger updates to the APFS free space calculations. Note that this method only applies to APFS-formatted drives which use volumes rather than true partitions (and I suspect the problem is caused by some bug in APFS).

Disclaimer: while this seemed to work for me without issues, it’s messing with fundamental parts of the system in a non-reversible way, and should be a last resort (also might not recommend for less technical users). Please do a full backup to an external drive before trying this.

  1. Open Disk Utility
  2. Select your main hard drive volume and take a note of the claimed available space
  3. Click the + Volume button in the toolbar
  4. Set the new volume’s reserved space to slightly under the supposed “available” amount of space (the max space and name don’t matter) and save
  5. Select the new volume (double checking you’ve selected the right one!) and click - Volume in the toolbar to delete it.
  6. Select your main volume again and you will probably see the “available” space has increased. Repeat the whole process several times until you no longer see space increases.

Not sure if this was necessary but after completing this process, I ran disk first aid on the APFS container itself and the individual volumes.

| improve this answer | |

You must log in to answer this question.

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