26

When compacting a sparse image with the hdiutil compact command, it fails with the message hdiutil: compact failed – Function not implemented.

  • I am getting this same error message, as root, on two different computers. One 10.10 (which created the sparsebundle) and on 10.6.8. – user110919 Jan 24 '15 at 16:55
46

The error message is pretty unclear, but one reason might be that you are not connected to the power outlet. Compacting a disk image might be a long and intensive task, and sometimes the OS denies it when you are running on battery to avoid any risk of data loss.

If you are positive that you have enough battery power to complete the task, you may overrun the limitation by adding the -batteryallowed flag:

hdiutil compact my.sparseimage -batteryallowed 
0

You may need to run the command as root :

sudo hdiutil compact <sparseimage>
  • Care to share the down-vote, hidden warrior? Running the command as root worked for me when I experienced the error message. – vol7ron Dec 22 '16 at 3:49
  • hidden warrior is probably hidden troll, pay no notice. You are right. Thanks. – cucu8 Aug 6 '17 at 16:51
  • Thanks, Cucu. I think I was surprised to see it on such an old question/answer. It's possible root is unnecessary. I suppose I could say as the system superuser, since some people don't use the default. – vol7ron Aug 6 '17 at 16:55

You must log in to answer this question.

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