Sysprep For Linux _best_ Link

sudo find /var/log -type f -exec truncate -s 0 {} ;

: Uses the Azure Linux Agent with the command waagent -deprovision+user . This prepares the system by clearing the user account, history, and network settings. sysprep for linux

sudo rm -f /etc/ssh/ssh_host_*

sudo apt clean # Debian/Ubuntu

sudo rm -f /etc/machine-id /var/lib/dbus/machine-id sudo find /var/log -type f -exec truncate -s