Cloned Image Clean Up

If you have created an image of a Mac to deploy onto other Macs then you will need to clean the machine of certain user & machine specific files

To do this, you will need to mount the image on another machine and in Terminal enter the following

sudo rm /Volumes/MacHD/Users/username/Send Registration
 sudo rm -rf /Volumes/MacHD/Users/username/Desktop/*
 sudo rm -rf /Volumes/MacHD/Users/username/Downloads/*
 sudo rm -rf /Volumes/MacHD/Users/username/Library/Caches/*

Replace username with the name of any and all of the user accounts on the image

sudo rm -rf /Volumes/MacHD/Documentation/old_*
 sudo rm -rf /Volumes/MacHD/Library/Caches/*
 sudo rm -rf /Volumes/MacHD/System/Library/Caches/*
 sudo rm -rf /Volumes/MacHD/Library/Managed Preferences/*
 sudo rm -rf /Volumes/MacHD/Users/Shared/*
 sudo rm -rf /Volumes/MacHD/private/etc/ssh_host*
 sudo rm -rf /Volumes/MacHD/private/var/db/volinfo.database
 sudo rm -rf /Volumes/MacHD/private/var/vm/swap*
 sudo rm -rf /Volumes/MacHD/private/var/vm/sleepimage

In these examples, my image Volume is named MacHD, always make sure your image Volume is not named the same as your currently booted system volume, otherwise you could end up deleting these files from the wrong volume