diff --git a/lib/img-functions b/lib/img-functions index a5eae91f7..4e3a694c1 100644 --- a/lib/img-functions +++ b/lib/img-functions @@ -107,6 +107,9 @@ function finalise_base () { sudo mv $TMP_MOUNT_PATH/etc/resolv.conf.ORIG $TMP_MOUNT_PATH/etc/resolv.conf fi fi + # Cleanup /tmp in the guest, so there is less cruft left there + unmount_dir $TMP_MOUNT_PATH/tmp + find $TMP_MOUNT_PATH/tmp -maxdepth 1 -mindepth 1 | xargs sudo rm -rf --one-file-system } function compress_and_save_image () {