(I wrote this in English in order to help more people.)
Last night I spent two hours fighting after my MacBook got totally stuck after I tried to install macOS Sierra update – without making sure that I have enough disk space to make the update. I downloaded the update from App Store. The update software told me that it needs 200 MB more space to do the update. I removed one program (TorBrowser) and I still did not have enough disk space. Then I removed another program (WhatsApp) and voilá: now the updater told that there is enough space for update and I started updating.
But: there is a bug in the updater: cleaning your disk to have about exactly the minimum required space was not enough. During the update my hard disk was filled to 100 % with 0 Mt free space and nothing worked. I was even not able to boot to safe mode by holding shift key during the boot. The installer started and jammed. Many times. The old OS won’t boot either.
The only way to fix things is to free up space so that the updater will finish its job.
So, here is the fix:
Step 1: Don’t be as stupid as I was. Before installing, be sure that you:
- Make a backup of your system (easiest way is using external hard drive and Time Machine)
- make sure that there is couple of gigabytes free space in addition to the minimum requirement of the update software. Move couple of family videos to USB stick. Unlink and delete your Dropbox folder. Or something.
Step 2 (if you googled my blog post you probably failed the first step 🙂: Boot into the recovery mode. Reboot your Mac and when you hear the startup chime, press Command and R until you see the Apple logo with progress bar under it. The progress bar may take couple of minutes to finish. Select language (if asked, I use English for this).
Step 3: You see now four options for restoring from backup, reinstalling OS, using browser to search help and using disk utility. But: from top menu, choose Utilities and Terminal.
Step 4: Enter command diskutil list to find the partition where your stuff is. In my example, it is disk0s2 with 250 GB space:
Step 5: If your disk is not encrypted, enter command diskutil mount disk0s2 (if necessary, replace disk0s2 with your volume name if it is different) and go to step 7.
Step 6 (only if your disk is encrypted): The command in step 5 does not work for encrypted volumes:
But you have to enter command diskutil coreStorage unlockVolume <UUID>, where <UUID> is the volume id I circled here (click for larger image):
Step 7: Now you can go to your home folder with cd command, for me it is cd /Volumes/Macintosh\ HD/Users/linjaaho/ . If you have couple of gigabytes of photos or something in Dropbox, the easiest way to free up space is to enter command rm -rf Dropbox . Remember to unlink your Dropbox so that when your computer reboots, you can reinstall dropbox from clean table and it downloads your files from the cloud.
Warning: be careful with rm -rf command, with it you can delete something important accidentally.
Step 8: Boot (Terminal => Quit Terminal, Apple menu => Restart) and enjoy!
After the installation is finished, the new operating system is smaller: before installing I had about 5 GB free and after 18 GT free!