Defragment Mac OSX from Recovery Mode

· 147 words · 1 minute read

Despite some notions that SSDs or HFS drives don’t need defragmenting, I have often read and experienced myself that defragmenting your Mac every few years will clearly make it faster.

I had some trouble running iDefrag and would like to share a little trick I learnt. Basically it will refuse to run a full defrag, while your system drive is mounted. Restarting didn’t help. Here is what I did in the end:

  1. Copy iDefrag and your license key to a USB drive.
    • Restart your Mac and keep Cmd + R pressed while booting. This should bring you in recovery mode. There you choose Utilities > Terminal.
      • Enter something like this in the Terminal: /Volumes/MY USB DRIVE/iDefrag.app/Contents/MacOS/iDefrag
        • This should start iDefrag and prompt you to supply a license file.
          • Now you should be able to run any defragmentation algorithm. I still recommend making a backup before doing so.