In addition to building deployable packages of applications and other files, Composer allows you to build DMGs of preconfigured operating systems. OS packages can save you time and enhance consistency across your network.
While building an OS package with Composer is similar to building one with the Disk Utility application, Composer allows you to clean up the OS by removing unnecessary files before building the DMG.
Composer allows you to manage the following cleanup options for an OS package:
Compress Disk Image
This option compresses the OS package DMG.
Delete Temp Files
This option ensures the files in /private/tmp are deleted before building an OS package. These files are usually deleted during the startup process.
Delete Virtual Memory Files
This option ensures that Virtual Memory files are deleted before building an OS package, including the potentially large sleepfile. These files are usually deleted and re-created during the startup process.
Delete Special Files
Apple recommends deleting the following files before building an OS package:
This option ensures that these files are deleted.
This option removes files in the /Library/Caches directory before building an OS package.
Remove System Keychain
This option removes the System keychain from the OS to ensure that a new System keychain is created. This can prevent the “This computer already exists” error when binding a computer to a directory service.
Ensure Trashes are Empty
This option empties the Trash for any user with items in the ~/.Trash folder. It also updates a user’s com.apple.dock.plist file to reflect that the Trash is empty.
Delete MCX Records in the Local Directory Service
This option removes the /var/db/dslocal/nodes/Default/computers/localhost.plist file before building an OS package.
Installing and Configuring the OS
For instructions on how to install and configure the OS before building an OS package, see the following Knowledge Base article:
Packaging the OS
When you’re finished configuring the OS, boot to another startup disk to build the DMG.
Open Composer and authenticate locally.
In the toolbar, click New .
Under the Operating System heading in the sidebar, select Build OS Package.
Select the drive you want to package and click Next.
Choose options for removing unnecessary files from the package and click Next.
Enter a package name and select a location to save the package, and then click Build.
For related information, see the following Knowledge Base article:
How Composer Displays Partitions when Building OS Packages
Find out how Composer 9.7 or later displays partitions when building OS packages.