Mac Format

Compacting sparse bundles

- byMARK BROWNLEE

QI’m using an encrypted ‘sparse bundle’ in APFS for private documents. How do I get it to reduce in size, as that isn’t available in Disk Utility?

ASparse bundles are a type of disk image which stores the contents of a virtual disk in ‘bands’ of fixed size within a bundle folder. These are sparse because, unlike regular disk images, they can grow in size as they need. Whilst they grow larger without any interventi­on, at least until they approach the max size you set when you create them, if you later remove files and folders from sparse bundles, they don’t automatica­lly shrink down again.

Disk Utility doesn’t currently offer any command to compact sparse bundles. The easiest way is using

C-Command’s DropDMG from the App Store, which is more comprehens­ive in its support for all types of disk image. Otherwise, you’ll need to open Terminal and use the command:

hdiutil compact myDocument­s. sparsebund­le

This will compact the sparse bundle named myDocument­s.

Storage inside a sparse bundle works like any other disk volume, and sometimes it won’t compact much because its contents are fragmented through the storage bands. You can try defragment­ing the sparse bundle when it has been mounted, then compacting it using DropDMG, or copying its contents to a new sparse bundle.

 ??  ?? DropDMG is a comprehens­ive suite of tools for anyone working with disk images and their relatives sparse bundles.
DropDMG is a comprehens­ive suite of tools for anyone working with disk images and their relatives sparse bundles.

Newspapers in English

Newspapers from Australia